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",
40 "launcher/test_result.cc",
41 "launcher/test_result.h",
42 "launcher/test_results_tracker.h",
43 "launcher/unit_test_launcher.h",
44 "mock_chrome_application_mac.h",
45 "mock_chrome_application_mac.mm",
46 "mock_devices_changed_observer.cc",
47 "mock_devices_changed_observer.h",
48 "mock_entropy_provider.cc",
49 "mock_entropy_provider.h",
52 "multiprocess_test.h",
53 "null_task_runner.cc",
55 "opaque_ref_counted.cc",
56 "opaque_ref_counted.h",
61 "perf_time_logger.cc",
63 "power_monitor_test_base.cc",
64 "power_monitor_test_base.h",
67 "scoped_path_override.cc",
68 "scoped_path_override.h",
69 "sequenced_task_runner_test_template.cc",
70 "sequenced_task_runner_test_template.h",
71 "sequenced_worker_pool_owner.cc",
72 "sequenced_worker_pool_owner.h",
73 "simple_test_clock.cc",
74 "simple_test_clock.h",
75 "simple_test_tick_clock.cc",
76 "simple_test_tick_clock.h",
77 "task_runner_test_template.cc",
78 "task_runner_test_template.h",
79 "test_discardable_memory_allocator.cc",
80 "test_discardable_memory_allocator.h",
83 "test_file_util_android.cc",
84 "test_file_util_linux.cc",
85 "test_file_util_mac.cc",
86 "test_file_util_posix.cc",
87 "test_file_util_win.cc",
90 "test_listener_ios.h",
91 "test_listener_ios.mm",
92 "test_mock_time_task_runner.cc",
93 "test_mock_time_task_runner.h",
94 "test_pending_task.cc",
95 "test_pending_task.h",
96 "test_reg_util_win.cc",
97 "test_reg_util_win.h",
98 "test_shortcut_win.cc",
99 "test_shortcut_win.h",
100 "test_simple_task_runner.cc",
101 "test_simple_task_runner.h",
104 "test_support_android.cc",
105 "test_support_android.h",
106 "test_support_ios.h",
107 "test_support_ios.mm",
108 "test_ui_thread_android.cc",
109 "test_ui_thread_android.h",
110 "thread_test_helper.cc",
111 "thread_test_helper.h",
112 "trace_event_analyzer.cc",
113 "trace_event_analyzer.h",
116 "user_action_tester.cc",
117 "user_action_tester.h",
118 "values_test_util.cc",
119 "values_test_util.h",
123 sources += [ "launcher/unit_test_launcher_ios.cc" ]
126 "launcher/test_launcher.cc",
127 "launcher/test_launcher.h",
128 "launcher/test_results_tracker.cc",
129 "launcher/unit_test_launcher.cc",
130 "multiprocess_test.cc",
131 "multiprocess_test_android.cc",
135 configs += [ "//build/config:precompiled_headers" ]
138 # The isolate needs this script for setting up the test. It's not actually
139 # needed to run this target locally.
140 "//testing/test_env.py",
147 "//base:base_static",
150 "//base/third_party/dynamic_annotations",
153 "//third_party/libxml",
154 "//third_party/icu:icuuc",
165 set_sources_assignment_filter([])
166 sources += [ "test_file_util_mac.cc" ]
167 set_sources_assignment_filter(sources_assignment_filter)
171 deps += [ ":base_unittests_jni_headers" ]
175 config("perf_test_config") {
176 defines = [ "PERF_TEST" ]
179 source_set("test_support_perf") {
182 "run_all_perftests.cc",
190 public_configs = [ ":perf_test_config" ]
193 source_set("run_all_unittests") {
196 "run_all_unittests.cc",
204 shared_library("malloc_wrapper") {
211 "//build/config/sanitizers:deps",
217 generate_jni("base_unittests_jni_headers") {
219 "android/java/src/org/chromium/base/ContentUriTestUtils.java",
220 "android/java/src/org/chromium/base/TestUiThread.java",