| Index: chrome/test/BUILD.gn
|
| diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
| index a2d2e0ee4c54d15dbfbae7f5f0c6a1947021a592..e629c8438c323a6cfb6dabbc84e900bbde98da6e 100644
|
| --- a/chrome/test/BUILD.gn
|
| +++ b/chrome/test/BUILD.gn
|
| @@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni")
|
| import("//build/config/crypto.gni")
|
| import("//build/config/features.gni")
|
| import("//build/config/ui.gni")
|
| -import("//build/module_args/v8.gni")
|
| +import("//chrome/test/base/js2gtest.gni")
|
| import("//testing/test.gni")
|
|
|
| # This target exists to reference other test executables to bring these files
|
| @@ -489,94 +489,6 @@ if (!is_android) {
|
| }
|
| }
|
|
|
| - template("js2gtest") {
|
| - assert(defined(invoker.test_type) &&
|
| - (invoker.test_type == "webui" || invoker.test_type == "unit"))
|
| - action_name = target_name + "_action"
|
| - source_set_name = target_name
|
| -
|
| - action_foreach(action_name) {
|
| - testonly = true
|
| - visibility = [ ":$source_set_name" ]
|
| - script = "//tools/gypv8sh.py"
|
| -
|
| - sources = invoker.sources
|
| -
|
| - d8_path =
|
| - get_label_info("//v8:d8($host_toolchain)", "root_out_dir") + "/d8"
|
| - if (is_win) {
|
| - d8_path += ".exe"
|
| - }
|
| -
|
| - input_js = [
|
| - "//chrome/third_party/mock4js/mock4js.js",
|
| - "//chrome/test/data/webui/test_api.js",
|
| - "//chrome/test/base/js2gtest.js",
|
| - ]
|
| - inputs = [ d8_path ] + input_js
|
| -
|
| - outputs = [
|
| - "$target_gen_dir/{{source_name_part}}-gen.cc",
|
| - "$root_out_dir/test_data/{{source_root_relative_dir}}/{{source_file_part}}",
|
| - ]
|
| -
|
| - args = [
|
| - # Need "./" for script to find binary (cur dir is not on path).
|
| - "./" + rebase_path(d8_path, root_build_dir),
|
| - ]
|
| - args += rebase_path(input_js, root_build_dir) + [ invoker.test_type ]
|
| - if (v8_use_external_startup_data) {
|
| - args += [ "--external=y" ]
|
| - } else {
|
| - args += [ "--external=n" ]
|
| - }
|
| - args += [
|
| - "{{source}}",
|
| - "{{source_root_relative_dir}}/{{source_file_part}}",
|
| - ]
|
| - args += rebase_path(outputs, root_build_dir)
|
| -
|
| - deps = [
|
| - "//v8:d8($host_toolchain)",
|
| - ]
|
| - }
|
| -
|
| - if (defined(invoker.extra_js_files)) {
|
| - copy_target_name = target_name + "_copy"
|
| - copy(copy_target_name) {
|
| - visibility = [ ":$source_set_name" ]
|
| - sources = invoker.extra_js_files
|
| - outputs = [
|
| - "$root_out_dir/test_data/{{source_root_relative_dir}}/{{source_file_part}}",
|
| - ]
|
| - }
|
| - }
|
| - source_set(source_set_name) {
|
| - testonly = true
|
| - if (defined(invoker.visibility)) {
|
| - visibility = invoker.visibility
|
| - }
|
| - sources = get_target_outputs(":$action_name")
|
| - if (defined(invoker.defines)) {
|
| - defines = invoker.defines
|
| - }
|
| - deps = [
|
| - ":$action_name",
|
| -
|
| - # The generator implicitly makes includes from these targets.
|
| - "//testing/gmock",
|
| - "//testing/gtest",
|
| - "//url",
|
| - ]
|
| - if (defined(invoker.deps)) {
|
| - deps += invoker.deps
|
| - }
|
| - if (defined(invoker.extra_js_files)) {
|
| - data_deps = [ ":$copy_target_name" ]
|
| - }
|
| - }
|
| - }
|
| -
|
| js2gtest("browser_tests_js_webui") {
|
| test_type = "webui"
|
| sources = rebase_path(
|
| @@ -905,6 +817,7 @@ if (!is_android) {
|
| deps += [
|
| #'app_mode_app_support', TODO(GYP)
|
| "//chrome",
|
| +
|
| #'../components/components.gyp:breakpad_stubs', TODO(GYP)
|
| "//third_party/ocmock",
|
| ]
|
|
|