1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # This file defines rules that allow you to include JavaScript tests in
6 # your unittests target.
8 # To add JS unittests to an existing unittest target, first include
9 # 'js_unittest_vars.gypi' at the top of your GYP file to define the required
13 # '<(DEPTH)/chrome/js_unittest_vars.gypi',
16 # Then include this rule file in each of your unittest targets:
19 # 'target_name': 'my_unittests',
22 # '<(DEPTH)/chrome/js_unittest_rules.gypi',
26 # Note that when you run your TestSuite, you'll need to call
27 # chrome::RegisterPathProvider(). These path providers are required by
28 # src/chrome/test/base/v8_unit_test.cc to setup and run the tests.
30 # See src/chrome/test/base/run_all_remoting_unittests.cc for an example.
34 # Used by rule js2unit below.
35 '../v8/src/d8.gyp:d8#host',
39 'rule_name': 'copyjs',
41 'msvs_external_rule': 1,
43 '<(DEPTH)/build/cp.py',
46 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).<(_extension)',
56 'rule_name': 'js2unit',
57 'extension': 'gtestjs',
58 'msvs_external_rule': 1,
61 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
63 '<(accessibility_audit_js)',
68 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)-gen.cc',
69 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).<(_extension)',
71 'process_outputs_as_sources': 1,
77 'chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).<(_extension)',