1 # Copyright 2014 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/features.gni")
6 import("//build/config/ui.gni")
8 gypi_values = exec_script(
9 "//build/gypi_to_gn.py",
10 [ rebase_path("../chrome_tests.gypi") ],
12 [ "../chrome_tests.gypi" ])
14 # This target exists to reference other test executables to bring these files
23 # GYP version: chrome/chrome_tests_unit.gypi:test_support_common
24 source_set("test_support") {
29 "base/chrome_process_util.cc",
30 "base/chrome_process_util.h",
31 "base/chrome_process_util_mac.cc",
32 "base/chrome_render_view_host_test_harness.cc",
33 "base/chrome_render_view_host_test_harness.h",
34 "base/chrome_test_launcher.cc",
35 "base/chrome_test_launcher.h",
36 "base/chrome_test_suite.cc",
37 "base/chrome_test_suite.h",
38 "base/chrome_unit_test_suite.cc",
39 "base/chrome_unit_test_suite.h",
40 "base/find_in_page_observer.cc",
41 "base/find_in_page_observer.h",
42 "base/history_index_restore_observer.cc",
43 "base/history_index_restore_observer.h",
44 "base/in_process_browser_test.cc",
45 "base/in_process_browser_test.h",
46 "base/profile_mock.cc",
47 "base/profile_mock.h",
48 "base/scoped_browser_locale.cc",
49 "base/scoped_browser_locale.h",
50 "base/scoped_testing_local_state.cc",
51 "base/scoped_testing_local_state.h",
52 "base/test_browser_window.cc",
53 "base/test_browser_window.h",
54 "base/test_launcher_utils.cc",
55 "base/test_launcher_utils.h",
56 "base/test_switches.cc",
57 "base/test_switches.h",
58 "base/testing_browser_process.cc",
59 "base/testing_browser_process.h",
60 "base/testing_browser_process_platform_part.h",
61 "base/testing_browser_process_platform_part.cc",
62 "base/testing_io_thread_state.cc",
63 "base/testing_io_thread_state.h",
64 "base/testing_pref_service_syncable.cc",
65 "base/testing_pref_service_syncable.h",
66 "base/testing_profile.cc",
67 "base/testing_profile.h",
68 "base/testing_profile_manager.cc",
69 "base/testing_profile_manager.h",
72 "base/ui_test_utils.cc",
73 "base/ui_test_utils.h",
74 "logging/win/file_logger.cc",
75 "logging/win/file_logger.h",
76 "logging/win/log_file_printer.cc",
77 "logging/win/log_file_printer.h",
78 "logging/win/log_file_reader.cc",
79 "logging/win/log_file_reader.h",
80 "logging/win/mof_data_parser.cc",
81 "logging/win/mof_data_parser.h",
82 "logging/win/test_log_collector.cc",
83 "logging/win/test_log_collector.h",
86 # New deps should go in the non-iOS section below.
88 "//content/test:test_support",
91 "//base:prefs_test_support",
92 "//base/test:test_support",
95 "//chrome/app:test_support",
96 #"//chrome/app/theme:theme_resources",
97 "//chrome/browser:test_support",
98 "//chrome/common:test_support",
99 "//chrome/renderer:test_support",
100 "//components/bookmarks/test",
101 "//components/component_updater:test_support",
102 "//components/gcm_driver:test_support",
103 "//components/history/core/test:test",
104 "//components/metrics:test_support",
105 "//components/omnibox:test_support",
106 "//components/ownership",
107 "//components/password_manager/core/browser:test_support",
108 "//components/pref_registry:test_support",
109 "//components/search_engines:test_support",
110 "//components/signin/core/browser:test_support",
111 "//components/sync_driver:test_support",
112 "//content/public/app:both",
113 "//ui/gfx:test_support",
115 "//net:test_support",
118 "//sql:test_support",
122 "//third_party/zlib",
123 "//ui/message_center:test_support",
131 "//content/public/child",
132 "//content/public/common",
133 "//content/public/plugin",
134 "//content/public/renderer",
135 "//content/public/utility",
136 "//components/autofill/core/browser:test_support",
137 "//components/captive_portal:test_support",
138 "//components/infobars/core",
139 "//components/sessions:test_support",
140 "//google_apis:test_support",
141 "//ipc:test_support",
142 "//media:test_support",
143 "//ppapi:ppapi_shared",
144 "//sql:test_support",
145 "//third_party/leveldatabase",
147 "//ui/events:events_base",
152 if (enable_extensions) {
154 "//chrome/common/extensions/api",
155 "//extensions:test_support",
160 deps += [ "//crypto:platform" ]
165 "//ui/snapshot:test_support",
169 #'../win8/win8.gyp:test_registrar_constants', TODO(GYP)
170 #'../win8/win8.gyp:test_support_win8', TODO(GYP)
175 if (enable_plugins) {
177 "ppapi/ppapi_test.cc",
178 "ppapi/ppapi_test.h",
183 deps += [ "//ash:test_support" ]
186 deps += [ "//ui/views:test_support" ]
189 if (enable_background) {
190 defines += [ "ENABLE_BACKGROUND=1" ]
193 if (enable_extensions) {
195 "//chrome/common/extensions/api",
196 "//extensions:test_support",
201 source_set("test_support_unit") {
204 "../browser/sync/glue/session_sync_test_helper.cc",
205 "../browser/sync/glue/session_sync_test_helper.h",
206 "base/run_all_unittests.cc",
212 "//chrome:resources",
217 "//mojo/environment:chromium",
221 source_set("sync_integration_test_support") {
224 sources = rebase_path(gypi_values.test_support_sync_integration_sources,
231 "//components/invalidation",
232 "//components/invalidation:test_support",
236 "//sync:test_support_sync_testserver",
237 "//sync:test_support_sync_fake_server",
238 "//ui/app_list:test_support",
243 "../browser/sync/test/integration/dictionary_helper.cc",
244 "../browser/sync/test/integration/dictionary_helper.h",
245 "../browser/sync/test/integration/dictionary_load_observer.cc",
246 "../browser/sync/test/integration/dictionary_load_observer.h",
249 if (!enable_app_list) {
251 "../browser/sync/test/integration/sync_app_list_helper.cc",
252 "../browser/sync/test/integration/sync_app_list_helper.h",
257 test("sync_integration_tests") {
258 sources = rebase_path(gypi_values.sync_integration_tests_sources,
261 # TODO(phajdan.jr): Only temporary, to make transition easier.
262 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
265 ":sync_integration_test_support",
268 "//chrome:packed_extra_resources",
269 "//chrome:packed_resources",
270 "//chrome:resources",
279 "//third_party/leveldatabase",
280 "//third_party/npapi",
281 "//third_party/WebKit/public:blink",
284 if (cld_version == 0 || cld_version == 2) {
285 # Language detection is irrelevant to sync, so it can depend on any
286 # implementation for CLD2. Dynamic is smaller, so go with dynamic.
287 deps += [ "//third_party/cld_2:cld2_dynamic" ]
290 # Dictionary sync is disabled on Mac.
292 "../browser/sync/test/integration/multiple_client_dictionary_sync_test.cc",
293 "../browser/sync/test/integration/single_client_dictionary_sync_test.cc",
294 "../browser/sync/test/integration/two_client_dictionary_sync_test.cc",
297 # The sync_integration_tests do not run on mac without this flag.
298 # Search for comments about "xcode_settings" elsewhere in this file.
299 ldflags = [ "-Wl,-ObjC" ]
302 # TODO(GYP) figure out what these should map to.
304 # '<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc',
305 # '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',
309 #'chrome_version_resources', TODO(GYP)
313 "../app/chrome_version.rc.version",
318 deps += [ "//ui/views" ]
320 if (enable_basic_printing || enable_print_preview) {
321 deps += [ "//printing" ]
323 if (!enable_app_list) {
325 "../browser/sync/test/integration/single_client_app_list_sync_test.cc",
326 "../browser/sync/test/integration/two_client_app_list_sync_test.cc",
329 if (!enable_managed_users) {
331 "../browser/sync/test/integration/single_client_supervised_user_settings_sync_test.cc",
336 test("sync_performance_tests") {
337 sources = rebase_path(gypi_values.sync_performance_tests_sources,
340 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
343 ":sync_integration_test_support",
351 if (cld_version == 0 || cld_version == 2) {
352 # Language detection is irrelevant to sync, so it can depend on any
353 # implementation for CLD2. Dynamic is smaller, so go with dynamic.
354 deps += [ "//third_party/cld_2:cld2_dynamic" ]
358 # Dictionary sync is disabled on Mac.
360 "../browser/sync/test/integration/performance/dictionary_sync_perf_test.cc",
363 # The sync_performance_tests do not run on mac without this flag.
364 # Search for comments about "xcode_settings" elsewhere in this file.
365 ldflags = [ "-Wl,-ObjC" ]
368 # TODO(GYP) figure out what these should map to.
370 # '<(SHARED_INTERMEDIATE_DIR)/chrome_version/other_version.rc',
371 # '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',
375 #'chrome_version_resources', TODO(GYP)
379 "../app/chrome_version.rc.version",
384 deps += [ "//ui/views" ]