ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / base / test / BUILD.gn
blob05a3dc36d10d42fbac3bd9e452162074d538ab9b
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 # GYP: //base/base.gyp:test_support_base
12 source_set("test_support") {
13   # TODO http://crbug.com/412064 enable this flag all the time.
14   testonly = !is_component_build
15   sources = [
16     "expectations/expectation.cc",
17     "expectations/expectation.h",
18     "expectations/parser.cc",
19     "expectations/parser.h",
20     "gtest_util.cc",
21     "gtest_util.h",
22     "gtest_xml_util.cc",
23     "gtest_xml_util.h",
24     "histogram_tester.cc",
25     "histogram_tester.h",
26     "launcher/test_launcher.cc",
27     "launcher/test_launcher.h",
28     "launcher/test_result.cc",
29     "launcher/test_result.h",
30     "launcher/test_results_tracker.cc",
31     "launcher/test_results_tracker.h",
32     "launcher/unit_test_launcher.cc",
33     "launcher/unit_test_launcher.h",
34     "launcher/unit_test_launcher_ios.cc",
35     "mock_chrome_application_mac.h",
36     "mock_chrome_application_mac.mm",
37     "mock_devices_changed_observer.cc",
38     "mock_devices_changed_observer.h",
39     "multiprocess_test.cc",
40     "multiprocess_test.h",
41     "multiprocess_test_android.cc",
42     "null_task_runner.cc",
43     "null_task_runner.h",
44     "opaque_ref_counted.cc",
45     "opaque_ref_counted.h",
46     "perf_log.cc",
47     "perf_log.h",
48     "perf_test_suite.cc",
49     "perf_test_suite.h",
50     "perf_time_logger.cc",
51     "perf_time_logger.h",
52     "power_monitor_test_base.cc",
53     "power_monitor_test_base.h",
54     "scoped_locale.cc",
55     "scoped_locale.h",
56     "scoped_path_override.cc",
57     "scoped_path_override.h",
58     "sequenced_task_runner_test_template.cc",
59     "sequenced_task_runner_test_template.h",
60     "sequenced_worker_pool_owner.cc",
61     "sequenced_worker_pool_owner.h",
62     "simple_test_clock.cc",
63     "simple_test_clock.h",
64     "simple_test_tick_clock.cc",
65     "simple_test_tick_clock.h",
66     "task_runner_test_template.cc",
67     "task_runner_test_template.h",
68     "test_file_util.cc",
69     "test_file_util.h",
70     "test_file_util_android.cc",
71     "test_file_util_linux.cc",
72     "test_file_util_mac.cc",
73     "test_file_util_posix.cc",
74     "test_file_util_win.cc",
75     "test_io_thread.cc",
76     "test_io_thread.h",
77     "test_listener_ios.h",
78     "test_listener_ios.mm",
79     "test_mock_time_task_runner.cc",
80     "test_mock_time_task_runner.h",
81     "test_pending_task.cc",
82     "test_pending_task.h",
83     "test_reg_util_win.cc",
84     "test_reg_util_win.h",
85     "test_shortcut_win.cc",
86     "test_shortcut_win.h",
87     "test_simple_task_runner.cc",
88     "test_simple_task_runner.h",
89     "test_suite.cc",
90     "test_suite.h",
91     "test_support_android.cc",
92     "test_support_android.h",
93     "test_support_ios.h",
94     "test_support_ios.mm",
95     "test_switches.cc",
96     "test_switches.h",
97     "test_timeouts.cc",
98     "test_timeouts.h",
99     "thread_test_helper.cc",
100     "thread_test_helper.h",
101     "trace_event_analyzer.cc",
102     "trace_event_analyzer.h",
103     "trace_to_file.cc",
104     "trace_to_file.h",
105     "values_test_util.cc",
106     "values_test_util.h",
107   ]
109   public_deps = [
110     "//base",
111     "//base:i18n",
112     "//base:base_static",
113   ]
114   deps = [
115     "//base/third_party/dynamic_annotations",
116     "//testing/gmock",
117     "//testing/gtest",
118     "//third_party/libxml",
119     "//third_party/icu:icuuc",
120   ]
122   if (!is_posix) {
123     sources -= [
124       "scoped_locale.cc",
125       "scoped_locale.h",
126     ]
127   }
128   if (is_ios) {
129     # iOS uses its own unit test launcher.
130     sources -= [ "launcher/unit_test_launcher.cc" ]
132     # Pull in specific Mac files for iOS (which have been filtered out
133     # by file name rules).
134     set_sources_assignment_filter([])
135     sources += [ "test_file_util_mac.cc" ]
136   }
138   if (is_android) {
139     deps += [ ":base_unittests_jni_headers" ]
140   }
143 config("perf_test_config") {
144   defines = [ "PERF_TEST" ]
147 source_set("test_support_perf") {
148   testonly = true
149   sources = [
150     "run_all_perftests.cc",
151   ]
152   deps = [
153     ":test_support",
154     "//base",
155     "//testing/gtest",
156   ]
158   public_configs = [ ":perf_test_config" ]
161 source_set("run_all_unittests") {
162   testonly = true
163   sources = [
164     "run_all_unittests.cc",
165   ]
166   deps = [
167     ":test_support",
168   ]
171 if (is_android) {
172   generate_jni("base_unittests_jni_headers") {
173     sources = [
174       "android/java/src/org/chromium/base/ContentUriTestUtils.java",
175     ]
176     jni_package = "base"
177   }