Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: chrome/test/base/js2gtest.gni

Issue 1265263002: Use new GN features in the build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 visibility = [ ":$source_set_name" ] 75 visibility = [ ":$source_set_name" ]
76 sources = invoker.extra_js_files 76 sources = invoker.extra_js_files
77 outputs = [ 77 outputs = [
78 "$root_out_dir/test_data/{{source_root_relative_dir}}/{{source_file_part }}", 78 "$root_out_dir/test_data/{{source_root_relative_dir}}/{{source_file_part }}",
79 ] 79 ]
80 } 80 }
81 } 81 }
82 82
83 source_set(source_set_name) { 83 source_set(source_set_name) {
84 testonly = true 84 testonly = true
85 if (defined(invoker.visibility)) { 85 forward_variables_from(invoker,
86 visibility = invoker.visibility 86 [
87 } 87 "defines",
88 "visibility",
89 ])
88 sources = get_target_outputs(":$action_name") 90 sources = get_target_outputs(":$action_name")
89 if (defined(invoker.defines)) {
90 defines = invoker.defines
91 }
92 deps = [ 91 deps = [
93 ":$action_name", 92 ":$action_name",
94 93
95 # The generator implicitly makes includes from these targets. 94 # The generator implicitly makes includes from these targets.
96 "//chrome/test:test_support", 95 "//chrome/test:test_support",
97 "//testing/gmock", 96 "//testing/gmock",
98 "//testing/gtest", 97 "//testing/gtest",
99 "//url", 98 "//url",
100 ] 99 ]
101 if (defined(invoker.deps)) { 100 if (defined(invoker.deps)) {
102 deps += invoker.deps 101 deps += invoker.deps
103 } 102 }
104 if (defined(invoker.extra_js_files)) { 103 if (defined(invoker.extra_js_files)) {
105 data_deps = [ ":$copy_target_name" ] 104 data_deps = [ ":$copy_target_name" ]
106 } 105 }
107 } 106 }
108 } 107 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698