Switch TestFrameNavigationObserver to DidCommitProvisionalLoadForFrame.
[chromium-blink-merge.git] / base / test / BUILD.gn
blob91456db0edca1cf1b112463f7aaf3e5356b52498
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")
7 if (is_android) {
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
14   sources = [
15     "test_switches.cc",
16     "test_switches.h",
17     "test_timeouts.cc",
18     "test_timeouts.h",
19   ]
20   deps = [
21     "//base",
22   ]
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
29   sources = [
30     "expectations/expectation.cc",
31     "expectations/expectation.h",
32     "expectations/parser.cc",
33     "expectations/parser.h",
34     "gtest_util.cc",
35     "gtest_util.h",
36     "gtest_xml_util.cc",
37     "gtest_xml_util.h",
38     "histogram_tester.cc",
39     "histogram_tester.h",
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",
55     "mock_log.cc",
56     "mock_log.h",
57     "multiprocess_test.cc",
58     "multiprocess_test.h",
59     "multiprocess_test_android.cc",
60     "null_task_runner.cc",
61     "null_task_runner.h",
62     "opaque_ref_counted.cc",
63     "opaque_ref_counted.h",
64     "perf_log.cc",
65     "perf_log.h",
66     "perf_test_suite.cc",
67     "perf_test_suite.h",
68     "perf_time_logger.cc",
69     "perf_time_logger.h",
70     "power_monitor_test_base.cc",
71     "power_monitor_test_base.h",
72     "scoped_locale.cc",
73     "scoped_locale.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",
88     "test_file_util.cc",
89     "test_file_util.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",
95     "test_io_thread.cc",
96     "test_io_thread.h",
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",
109     "test_suite.cc",
110     "test_suite.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",
119     "trace_to_file.cc",
120     "trace_to_file.h",
121     "user_action_tester.cc",
122     "user_action_tester.h",
123     "values_test_util.cc",
124     "values_test_util.h",
125   ]
127   public_deps = [
128     ":test_config",
129     "//base",
130     "//base:i18n",
131     "//base:base_static",
132   ]
133   deps = [
134     "//base/third_party/dynamic_annotations",
135     "//testing/gmock",
136     "//testing/gtest",
137     "//third_party/libxml",
138     "//third_party/icu:icuuc",
139   ]
141   if (!is_posix) {
142     sources -= [
143       "scoped_locale.cc",
144       "scoped_locale.h",
145     ]
146   }
147   if (is_ios) {
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" ]
155   }
157   if (is_android) {
158     deps += [ ":base_unittests_jni_headers" ]
159   }
162 config("perf_test_config") {
163   defines = [ "PERF_TEST" ]
166 source_set("test_support_perf") {
167   testonly = true
168   sources = [
169     "run_all_perftests.cc",
170   ]
171   deps = [
172     ":test_support",
173     "//base",
174     "//testing/gtest",
175   ]
177   public_configs = [ ":perf_test_config" ]
180 source_set("run_all_unittests") {
181   testonly = true
182   sources = [
183     "run_all_unittests.cc",
184   ]
185   deps = [
186     ":test_support",
187   ]
190 if (is_linux) {
191   shared_library("malloc_wrapper") {
192     testonly = true
193     sources = [
194       "malloc_wrapper.cc",
195     ]
196     deps = [
197       "//base",
198     ]
199   }
202 if (is_android) {
203   generate_jni("base_unittests_jni_headers") {
204     sources = [
205       "android/java/src/org/chromium/base/ContentUriTestUtils.java",
206     ]
207     jni_package = "base"
208   }