OLD | NEW |
---|---|
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/module_args/v8.gni") | 5 import("//build/module_args/v8.gni") |
6 | 6 |
7 template("js2gtest") { | 7 template("js2gtest") { |
8 assert(defined(invoker.test_type) && | 8 assert(defined(invoker.test_type) && |
9 (invoker.test_type == "webui" || invoker.test_type == "unit" || | 9 (invoker.test_type == "webui" || invoker.test_type == "unit" || |
10 invoker.test_type == "extension")) | 10 invoker.test_type == "extension")) |
(...skipping 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 input_js = [ | 29 input_js = [ |
30 "//chrome/third_party/mock4js/mock4js.js", | 30 "//chrome/third_party/mock4js/mock4js.js", |
31 "//chrome/test/data/webui/test_api.js", | 31 "//chrome/test/data/webui/test_api.js", |
32 "//chrome/test/base/js2gtest.js", | 32 "//chrome/test/base/js2gtest.js", |
33 ] | 33 ] |
34 inputs = [ d8_path ] + input_js | 34 inputs = [ d8_path ] + input_js |
35 if (defined(invoker.deps_js)) { | 35 if (defined(invoker.deps_js)) { |
36 inputs += [ invoker.deps_js ] | 36 inputs += [ invoker.deps_js ] |
37 } | 37 } |
38 if (defined(invoker.extra_gen_files)) { | |
39 inputs += invoker.extra_gen_files | |
brettw
2015/08/26 22:31:06
What does this name mean? I read this as "extra ge
| |
40 } | |
38 | 41 |
39 # Outputs. The script will copy the source files to the output directory, | 42 # Outputs. The script will copy the source files to the output directory, |
40 # which then must be treated as runtime data. The generated .cc file isn't | 43 # which then must be treated as runtime data. The generated .cc file isn't |
41 # data, it will be compiled in a step below. | 44 # data, it will be compiled in a step below. |
42 outputs = [ | 45 outputs = [ |
43 "$target_gen_dir/{{source_name_part}}-gen.cc", | 46 "$target_gen_dir/{{source_name_part}}-gen.cc", |
44 copied_source_pattern, | 47 copied_source_pattern, |
45 ] | 48 ] |
46 data = process_file_template(sources, [ copied_source_pattern ]) | 49 data = process_file_template(sources, [ copied_source_pattern ]) |
47 | 50 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 "//url", | 108 "//url", |
106 ] | 109 ] |
107 if (defined(invoker.deps)) { | 110 if (defined(invoker.deps)) { |
108 deps += invoker.deps | 111 deps += invoker.deps |
109 } | 112 } |
110 if (defined(invoker.extra_js_files)) { | 113 if (defined(invoker.extra_js_files)) { |
111 data_deps = [ ":$copy_target_name" ] | 114 data_deps = [ ":$copy_target_name" ] |
112 } | 115 } |
113 } | 116 } |
114 } | 117 } |
OLD | NEW |