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
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
6 import("//chrome/chrome_tests.gni")
7 import("//testing/test.gni")
9 # GYP version: chrome/chrome_tests.gypi:automation_client_lib
10 # (embed_js_in_cpp action)
11 action("embed_js_in_cpp") {
12 script = "embed_js_in_cpp.py"
16 "js/call_function.js",
17 "js/execute_async_script.js",
19 "js/get_element_region.js",
20 "js/is_option_element_toggleable.js",
23 inputs = [ "cpp_source.py" ] + js_files
26 "$target_gen_dir/chrome/js.cc",
27 "$target_gen_dir/chrome/js.h",
31 rebase_path("$target_gen_dir/chrome", root_build_dir),
33 args += rebase_path(js_files, root_build_dir)
36 # GYP version: chrome/chrome_tests.gypi:automation_client_lib
37 # (embed_user_data_dir_in_cpp action)
38 action("embed_user_data_dir_in_cpp") {
39 script = "embed_user_data_dir_in_cpp.py"
42 "chrome/preferences.txt",
43 "chrome/local_state.txt",
46 inputs = [ "cpp_source.py" ] + files
48 "$target_gen_dir/chrome/user_data_dir.cc",
49 "$target_gen_dir/chrome/user_data_dir.h",
54 rebase_path("$target_gen_dir/chrome", root_build_dir),
56 args += rebase_path(files, root_build_dir)
59 # GYP version: chrome/chrome_tests.gypi:automation_client_lib
60 # (embed_extension_in_cpp action)
61 action("embed_extension_in_cpp") {
62 script = "embed_extension_in_cpp.py"
65 "extension/background.js",
66 "extension/manifest.json",
69 inputs = [ "cpp_source.py" ] + files
71 "$target_gen_dir/chrome/embedded_automation_extension.cc",
72 "$target_gen_dir/chrome/embedded_automation_extension.h",
77 rebase_path("$target_gen_dir/chrome", root_build_dir),
79 args += rebase_path(files, root_build_dir)
82 # GYP version: chrome/chrome_tests.gypi:automation_client_lib
83 source_set("automation_client_lib") {
85 rebase_path(chrome_tests_gypi_values.chrome_automation_client_lib_sources,
89 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
90 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
92 # Also compile the generated files.
93 sources += get_target_outputs(":embed_extension_in_cpp")
94 sources += get_target_outputs(":embed_js_in_cpp")
95 sources += get_target_outputs(":embed_user_data_dir_in_cpp")
98 ":embed_extension_in_cpp",
100 ":embed_user_data_dir_in_cpp",
102 "//base/third_party/dynamic_annotations",
104 "//third_party/zlib:zip",
105 "//third_party/zlib:minizip",
106 "//ui/accessibility:ax_gen",
114 # GYP version: chrome/chrome_tests.gypi:chromedriver_lib
115 # (embed_version_in_cpp action)
116 action("embed_version_in_cpp") {
117 script = "embed_version_in_cpp.py"
123 "$target_gen_dir/version.cc",
124 "$target_gen_dir/version.h",
129 rebase_path("VERSION", root_build_dir),
131 rebase_path(target_gen_dir, root_build_dir),
135 # GYP version: chrome/chrome_tests.gypi:chromedriver_lib
137 sources = rebase_path(chrome_tests_gypi_values.chrome_driver_lib_sources,
141 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
142 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
144 # Also compile the generated version files.
145 sources += get_target_outputs(":embed_version_in_cpp")
147 # These aren't automatically filtered out.
149 sources -= [ "keycode_text_conversion_x.cc" ]
152 sources -= [ "keycode_text_conversion_ozone.cc" ]
156 ":automation_client_lib",
157 ":embed_version_in_cpp",
159 "//base/third_party/dynamic_annotations",
163 "//third_party/zlib",
165 "//ui/events:dom_keycode_converter",
166 "//ui/events:events_base",
172 configs += [ "//build/config/linux:x11" ]
173 deps += [ "//ui/gfx/x" ]
177 executable("chromedriver") {
179 "server/chromedriver_server.cc",
182 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
183 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
187 "//build/config/sanitizers:deps",
191 # TODO(GYP): Delete this after we've converted everything to GN.
192 # The _run targets exist only for compatibility w/ GYP.
193 group("chromedriver_unittests_run") {
196 ":chromedriver_unittests",
200 test("chromedriver_unittests") {
202 rebase_path(chrome_tests_gypi_values.chrome_driver_unittests_sources,
206 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
207 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
210 "//chrome/test/data/chromedriver/",
216 "//base/test:run_all_unittests",
226 # ChromeDriver tests that aren't run on the main buildbot. Available as an
227 # optional test type on trybots.
228 test("chromedriver_tests") {
229 sources = rebase_path(chrome_tests_gypi_values.chrome_driver_tests_sources,
233 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
234 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
239 "//base/test:run_all_unittests",
242 "//net:test_support",