OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 import("//build/config/ui.gni") |
| 6 import("//chrome/chrome_tests.gni") |
| 7 import("//testing/test.gni") |
| 8 |
| 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" |
| 13 |
| 14 js_files = [ |
| 15 "js/add_cookie.js", |
| 16 "js/call_function.js", |
| 17 "js/execute_async_script.js", |
| 18 "js/focus.js", |
| 19 "js/get_element_region.js", |
| 20 "js/is_option_element_toggleable.js", |
| 21 ] |
| 22 |
| 23 inputs = [ "cpp_source.py" ] + js_files |
| 24 |
| 25 outputs = [ |
| 26 "$target_gen_dir/chrome/js.cc", |
| 27 "$target_gen_dir/chrome/js.h", |
| 28 ] |
| 29 args = [ |
| 30 "--directory", |
| 31 rebase_path("$target_gen_dir/chrome", root_build_dir), |
| 32 ] |
| 33 args += rebase_path(js_files, root_build_dir) |
| 34 } |
| 35 |
| 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" |
| 40 |
| 41 files = [ |
| 42 "chrome/preferences.txt", |
| 43 "chrome/local_state.txt", |
| 44 ] |
| 45 |
| 46 inputs = [ "cpp_source.py" ] + files |
| 47 outputs = [ |
| 48 "$target_gen_dir/chrome/user_data_dir.cc", |
| 49 "$target_gen_dir/chrome/user_data_dir.h", |
| 50 ] |
| 51 |
| 52 args = [ |
| 53 "--directory", |
| 54 rebase_path("$target_gen_dir/chrome", root_build_dir), |
| 55 ] |
| 56 args += rebase_path(files, root_build_dir) |
| 57 } |
| 58 |
| 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" |
| 63 |
| 64 files = [ |
| 65 "extension/background.js", |
| 66 "extension/manifest.json", |
| 67 ] |
| 68 |
| 69 inputs = [ "cpp_source.py" ] + files |
| 70 outputs = [ |
| 71 "$target_gen_dir/chrome/embedded_automation_extension.cc", |
| 72 "$target_gen_dir/chrome/embedded_automation_extension.h", |
| 73 ] |
| 74 |
| 75 args = [ |
| 76 "--directory", |
| 77 rebase_path("$target_gen_dir/chrome", root_build_dir), |
| 78 ] |
| 79 args += rebase_path(files, root_build_dir) |
| 80 } |
| 81 |
| 82 # GYP version: chrome/chrome_tests.gypi:automation_client_lib |
| 83 source_set("automation_client_lib") { |
| 84 sources = |
| 85 rebase_path(chrome_tests_gypi_values.chrome_automation_client_lib_sources, |
| 86 ".", |
| 87 "//chrome") |
| 88 |
| 89 # Also compile the generated files. |
| 90 sources += get_target_outputs(":embed_extension_in_cpp") |
| 91 sources += get_target_outputs(":embed_js_in_cpp") |
| 92 sources += get_target_outputs(":embed_user_data_dir_in_cpp") |
| 93 |
| 94 deps = [ |
| 95 ":embed_js_in_cpp", |
| 96 ":embed_user_data_dir_in_cpp", |
| 97 "//base", |
| 98 "//base/third_party/dynamic_annotations", |
| 99 "//net", |
| 100 "//third_party/zlib:zip", |
| 101 "//third_party/zlib:minizip", |
| 102 "//ui/accessibility:ax_gen", |
| 103 "//ui/base", |
| 104 "//ui/gfx", |
| 105 "//ui/gfx/geometry", |
| 106 "//url", |
| 107 ] |
| 108 } |
| 109 |
| 110 # GYP version: chrome/chrome_tests.gypi:chromedriver_lib |
| 111 # (embed_version_in_cpp action) |
| 112 action("embed_version_in_cpp") { |
| 113 script = "embed_version_in_cpp.py" |
| 114 inputs = [ |
| 115 "cpp_source.py", |
| 116 "VERSION", |
| 117 ] |
| 118 outputs = [ |
| 119 "$target_gen_dir/version.cc", |
| 120 "$target_gen_dir/version.h", |
| 121 ] |
| 122 |
| 123 args = [ |
| 124 "--version-file", |
| 125 rebase_path("VERSION", root_build_dir), |
| 126 "--directory", |
| 127 rebase_path(target_gen_dir, root_build_dir), |
| 128 ] |
| 129 } |
| 130 |
| 131 # GYP version: chrome/chrome_tests.gypi:chromedriver_lib |
| 132 source_set("lib") { |
| 133 sources = rebase_path(chrome_tests_gypi_values.chrome_driver_lib_sources, |
| 134 ".", |
| 135 "//chrome") |
| 136 |
| 137 # Also compile the generated version files. |
| 138 sources += get_target_outputs(":embed_version_in_cpp") |
| 139 |
| 140 # These aren't automatically filtered out. |
| 141 if (!use_x11) { |
| 142 sources -= [ "keycode_text_conversion_x.cc" ] |
| 143 } |
| 144 if (!use_ozone) { |
| 145 sources -= [ "keycode_text_conversion_ozone.cc" ] |
| 146 } |
| 147 |
| 148 deps = [ |
| 149 ":automation_client_lib", |
| 150 ":embed_version_in_cpp", |
| 151 "//base", |
| 152 "//base/third_party/dynamic_annotations", |
| 153 "//crypto", |
| 154 "//net", |
| 155 "//net:http_server", |
| 156 "//third_party/zlib", |
| 157 "//ui/base", |
| 158 "//ui/events:events_base", |
| 159 "//ui/gfx", |
| 160 "//ui/gfx/geometry", |
| 161 ] |
| 162 |
| 163 if (use_x11) { |
| 164 configs += [ "//build/config/linux:x11" ] |
| 165 deps += [ "//ui/gfx/x" ] |
| 166 } |
| 167 } |
| 168 |
| 169 executable("chromedriver") { |
| 170 sources = [ |
| 171 "server/chromedriver_server.cc", |
| 172 ] |
| 173 |
| 174 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 175 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 176 |
| 177 deps = [ |
| 178 ":lib", |
| 179 ] |
| 180 } |
| 181 |
| 182 test("chromedriver_unittests") { |
| 183 sources = |
| 184 rebase_path(chrome_tests_gypi_values.chrome_driver_unittests_sources, |
| 185 ".", |
| 186 "//chrome") |
| 187 |
| 188 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 189 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 190 |
| 191 deps = [ |
| 192 ":lib", |
| 193 "//base", |
| 194 "//base/test:run_all_unittests", |
| 195 "//net", |
| 196 "//net:http_server", |
| 197 "//testing/gtest", |
| 198 "//ui/base", |
| 199 "//ui/gfx", |
| 200 "//ui/gfx/geometry", |
| 201 ] |
| 202 } |
| 203 |
| 204 # ChromeDriver tests that aren't run on the main buildbot. Available as an |
| 205 # optional test type on trybots. |
| 206 test("chromedriver_tests") { |
| 207 sources = rebase_path(chrome_tests_gypi_values.chrome_driver_tests_sources, |
| 208 ".", |
| 209 "//chrome") |
| 210 |
| 211 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 212 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 213 |
| 214 deps = [ |
| 215 ":lib", |
| 216 "//base", |
| 217 "//base/test:run_all_unittests", |
| 218 "//net", |
| 219 "//net:http_server", |
| 220 "//net:test_support", |
| 221 "//testing/gtest", |
| 222 "//url", |
| 223 ] |
| 224 } |
OLD | NEW |