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
30 "expectations/expectation.cc",
31 "expectations/expectation.h",
32 "expectations/parser.cc",
33 "expectations/parser.h",
36 "gtest_xml_unittest_result_printer.cc",
37 "gtest_xml_unittest_result_printer.h",
40 "histogram_tester.cc",
42 "launcher/test_launcher.cc",
43 "launcher/test_launcher.h",
44 "launcher/test_result.cc",
45 "launcher/test_result.h",
46 "launcher/test_results_tracker.cc",
47 "launcher/test_results_tracker.h",
48 "launcher/unit_test_launcher.cc",
49 "launcher/unit_test_launcher.h",
50 "launcher/unit_test_launcher_ios.cc",
51 "mock_chrome_application_mac.h",
52 "mock_chrome_application_mac.mm",
53 "mock_devices_changed_observer.cc",
54 "mock_devices_changed_observer.h",
55 "mock_entropy_provider.cc",
56 "mock_entropy_provider.h",
59 "multiprocess_test.cc",
60 "multiprocess_test.h",
61 "multiprocess_test_android.cc",
62 "null_task_runner.cc",
64 "opaque_ref_counted.cc",
65 "opaque_ref_counted.h",
70 "perf_time_logger.cc",
72 "power_monitor_test_base.cc",
73 "power_monitor_test_base.h",
76 "scoped_path_override.cc",
77 "scoped_path_override.h",
78 "sequenced_task_runner_test_template.cc",
79 "sequenced_task_runner_test_template.h",
80 "sequenced_worker_pool_owner.cc",
81 "sequenced_worker_pool_owner.h",
82 "simple_test_clock.cc",
83 "simple_test_clock.h",
84 "simple_test_tick_clock.cc",
85 "simple_test_tick_clock.h",
86 "task_runner_test_template.cc",
87 "task_runner_test_template.h",
88 "test_discardable_memory_allocator.cc",
89 "test_discardable_memory_allocator.h",
92 "test_file_util_android.cc",
93 "test_file_util_linux.cc",
94 "test_file_util_mac.cc",
95 "test_file_util_posix.cc",
96 "test_file_util_win.cc",
99 "test_listener_ios.h",
100 "test_listener_ios.mm",
101 "test_mock_time_task_runner.cc",
102 "test_mock_time_task_runner.h",
103 "test_pending_task.cc",
104 "test_pending_task.h",
105 "test_reg_util_win.cc",
106 "test_reg_util_win.h",
107 "test_shortcut_win.cc",
108 "test_shortcut_win.h",
109 "test_simple_task_runner.cc",
110 "test_simple_task_runner.h",
113 "test_support_android.cc",
114 "test_support_android.h",
115 "test_support_ios.h",
116 "test_support_ios.mm",
117 "test_ui_thread_android.cc",
118 "test_ui_thread_android.h",
119 "thread_test_helper.cc",
120 "thread_test_helper.h",
121 "trace_event_analyzer.cc",
122 "trace_event_analyzer.h",
125 "user_action_tester.cc",
126 "user_action_tester.h",
127 "values_test_util.cc",
128 "values_test_util.h",
135 "//base:base_static",
138 "//base/third_party/dynamic_annotations",
141 "//third_party/libxml",
142 "//third_party/icu:icuuc",
152 # iOS uses its own unit test launcher.
153 sources -= [ "launcher/unit_test_launcher.cc" ]
155 # Pull in specific Mac files for iOS (which have been filtered out
156 # by file name rules).
157 set_sources_assignment_filter([])
158 sources += [ "test_file_util_mac.cc" ]
162 deps += [ ":base_unittests_jni_headers" ]
166 config("perf_test_config") {
167 defines = [ "PERF_TEST" ]
170 source_set("test_support_perf") {
173 "run_all_perftests.cc",
181 public_configs = [ ":perf_test_config" ]
184 source_set("run_all_unittests") {
187 "run_all_unittests.cc",
195 shared_library("malloc_wrapper") {
207 generate_jni("base_unittests_jni_headers") {
209 "android/java/src/org/chromium/base/ContentUriTestUtils.java",
210 "android/java/src/org/chromium/base/TestUiThread.java",