1 # Copyright (c) 2013 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")
8 import("//build/config/android/rules.gni")
11 source_set("test_config") {
12 # TODO http://crbug.com/412064 enable this flag all the time.
13 testonly = !is_component_build
25 # GYP: //base/base.gyp:test_support_base
26 source_set("test_support") {
27 # TODO http://crbug.com/412064 enable this flag all the time.
28 testonly = !is_component_build
32 "gtest_xml_unittest_result_printer.cc",
33 "gtest_xml_unittest_result_printer.h",
36 "histogram_tester.cc",
38 "launcher/test_launcher.cc",
39 "launcher/test_launcher.h",
40 "launcher/test_result.cc",
41 "launcher/test_result.h",
42 "launcher/test_results_tracker.cc",
43 "launcher/test_results_tracker.h",
44 "launcher/unit_test_launcher.cc",
45 "launcher/unit_test_launcher.h",
46 "launcher/unit_test_launcher_ios.cc",
47 "mock_chrome_application_mac.h",
48 "mock_chrome_application_mac.mm",
49 "mock_devices_changed_observer.cc",
50 "mock_devices_changed_observer.h",
51 "mock_entropy_provider.cc",
52 "mock_entropy_provider.h",
55 "multiprocess_test.cc",
56 "multiprocess_test.h",
57 "multiprocess_test_android.cc",
58 "null_task_runner.cc",
60 "opaque_ref_counted.cc",
61 "opaque_ref_counted.h",
66 "perf_time_logger.cc",
68 "power_monitor_test_base.cc",
69 "power_monitor_test_base.h",
72 "scoped_path_override.cc",
73 "scoped_path_override.h",
74 "sequenced_task_runner_test_template.cc",
75 "sequenced_task_runner_test_template.h",
76 "sequenced_worker_pool_owner.cc",
77 "sequenced_worker_pool_owner.h",
78 "simple_test_clock.cc",
79 "simple_test_clock.h",
80 "simple_test_tick_clock.cc",
81 "simple_test_tick_clock.h",
82 "task_runner_test_template.cc",
83 "task_runner_test_template.h",
84 "test_discardable_memory_allocator.cc",
85 "test_discardable_memory_allocator.h",
88 "test_file_util_android.cc",
89 "test_file_util_linux.cc",
90 "test_file_util_mac.cc",
91 "test_file_util_posix.cc",
92 "test_file_util_win.cc",
95 "test_listener_ios.h",
96 "test_listener_ios.mm",
97 "test_mock_time_task_runner.cc",
98 "test_mock_time_task_runner.h",
99 "test_pending_task.cc",
100 "test_pending_task.h",
101 "test_reg_util_win.cc",
102 "test_reg_util_win.h",
103 "test_shortcut_win.cc",
104 "test_shortcut_win.h",
105 "test_simple_task_runner.cc",
106 "test_simple_task_runner.h",
109 "test_support_android.cc",
110 "test_support_android.h",
111 "test_support_ios.h",
112 "test_support_ios.mm",
113 "test_ui_thread_android.cc",
114 "test_ui_thread_android.h",
115 "thread_test_helper.cc",
116 "thread_test_helper.h",
117 "trace_event_analyzer.cc",
118 "trace_event_analyzer.h",
121 "user_action_tester.cc",
122 "user_action_tester.h",
123 "values_test_util.cc",
124 "values_test_util.h",
128 # The isolate needs this script for setting up the test. It's not actually
129 # needed to run this target locally.
130 "//testing/test_env.py",
137 "//base:base_static",
140 "//base/third_party/dynamic_annotations",
143 "//third_party/libxml",
144 "//third_party/icu:icuuc",
154 # iOS uses its own unit test launcher.
155 sources -= [ "launcher/unit_test_launcher.cc" ]
157 # Pull in specific Mac files for iOS (which have been filtered out
158 # by file name rules).
159 set_sources_assignment_filter([])
160 sources += [ "test_file_util_mac.cc" ]
164 deps += [ ":base_unittests_jni_headers" ]
168 config("perf_test_config") {
169 defines = [ "PERF_TEST" ]
172 source_set("test_support_perf") {
175 "run_all_perftests.cc",
183 public_configs = [ ":perf_test_config" ]
186 source_set("run_all_unittests") {
189 "run_all_unittests.cc",
197 shared_library("malloc_wrapper") {
209 generate_jni("base_unittests_jni_headers") {
211 "android/java/src/org/chromium/base/ContentUriTestUtils.java",
212 "android/java/src/org/chromium/base/TestUiThread.java",