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",
38 "histogram_tester.cc",
40 "launcher/test_launcher.cc",
41 "launcher/test_launcher.h",
42 "launcher/test_result.cc",
43 "launcher/test_result.h",
44 "launcher/test_results_tracker.cc",
45 "launcher/test_results_tracker.h",
46 "launcher/unit_test_launcher.cc",
47 "launcher/unit_test_launcher.h",
48 "launcher/unit_test_launcher_ios.cc",
49 "mock_chrome_application_mac.h",
50 "mock_chrome_application_mac.mm",
51 "mock_devices_changed_observer.cc",
52 "mock_devices_changed_observer.h",
53 "mock_entropy_provider.cc",
54 "mock_entropy_provider.h",
57 "multiprocess_test.cc",
58 "multiprocess_test.h",
59 "multiprocess_test_android.cc",
60 "null_task_runner.cc",
62 "opaque_ref_counted.cc",
63 "opaque_ref_counted.h",
68 "perf_time_logger.cc",
70 "power_monitor_test_base.cc",
71 "power_monitor_test_base.h",
74 "scoped_path_override.cc",
75 "scoped_path_override.h",
76 "sequenced_task_runner_test_template.cc",
77 "sequenced_task_runner_test_template.h",
78 "sequenced_worker_pool_owner.cc",
79 "sequenced_worker_pool_owner.h",
80 "simple_test_clock.cc",
81 "simple_test_clock.h",
82 "simple_test_tick_clock.cc",
83 "simple_test_tick_clock.h",
84 "task_runner_test_template.cc",
85 "task_runner_test_template.h",
86 "test_discardable_memory_allocator.cc",
87 "test_discardable_memory_allocator.h",
90 "test_file_util_android.cc",
91 "test_file_util_linux.cc",
92 "test_file_util_mac.cc",
93 "test_file_util_posix.cc",
94 "test_file_util_win.cc",
97 "test_listener_ios.h",
98 "test_listener_ios.mm",
99 "test_mock_time_task_runner.cc",
100 "test_mock_time_task_runner.h",
101 "test_pending_task.cc",
102 "test_pending_task.h",
103 "test_reg_util_win.cc",
104 "test_reg_util_win.h",
105 "test_shortcut_win.cc",
106 "test_shortcut_win.h",
107 "test_simple_task_runner.cc",
108 "test_simple_task_runner.h",
111 "test_support_android.cc",
112 "test_support_android.h",
113 "test_support_ios.h",
114 "test_support_ios.mm",
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",
131 "//base:base_static",
134 "//base/third_party/dynamic_annotations",
137 "//third_party/libxml",
138 "//third_party/icu:icuuc",
148 # iOS uses its own unit test launcher.
149 sources -= [ "launcher/unit_test_launcher.cc" ]
151 # Pull in specific Mac files for iOS (which have been filtered out
152 # by file name rules).
153 set_sources_assignment_filter([])
154 sources += [ "test_file_util_mac.cc" ]
158 deps += [ ":base_unittests_jni_headers" ]
162 config("perf_test_config") {
163 defines = [ "PERF_TEST" ]
166 source_set("test_support_perf") {
169 "run_all_perftests.cc",
177 public_configs = [ ":perf_test_config" ]
180 source_set("run_all_unittests") {
183 "run_all_unittests.cc",
191 shared_library("malloc_wrapper") {
203 generate_jni("base_unittests_jni_headers") {
205 "android/java/src/org/chromium/base/ContentUriTestUtils.java",