OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
7 | 7 |
8 if (is_chromeos) { | 8 component("display") { |
9 component("display") { | 9 sources = [ |
10 sources = [ | 10 "chromeos/apply_content_protection_task.cc", |
11 "chromeos/apply_content_protection_task.cc", | 11 "chromeos/apply_content_protection_task.h", |
12 "chromeos/apply_content_protection_task.h", | 12 "chromeos/configure_displays_task.cc", |
13 "chromeos/configure_displays_task.cc", | 13 "chromeos/configure_displays_task.h", |
14 "chromeos/configure_displays_task.h", | 14 "chromeos/display_configurator.cc", |
15 "chromeos/display_configurator.cc", | 15 "chromeos/display_configurator.h", |
16 "chromeos/display_configurator.h", | 16 "chromeos/display_layout_manager.h", |
17 "chromeos/display_layout_manager.h", | 17 "chromeos/display_snapshot_virtual.cc", |
18 "chromeos/display_snapshot_virtual.cc", | 18 "chromeos/display_snapshot_virtual.h", |
19 "chromeos/display_snapshot_virtual.h", | 19 "chromeos/display_util.cc", |
20 "chromeos/display_util.cc", | 20 "chromeos/display_util.h", |
21 "chromeos/display_util.h", | 21 "chromeos/ozone/display_configurator_ozone.cc", |
22 "chromeos/ozone/display_configurator_ozone.cc", | 22 "chromeos/query_content_protection_task.cc", |
23 "chromeos/query_content_protection_task.cc", | 23 "chromeos/query_content_protection_task.h", |
24 "chromeos/query_content_protection_task.h", | 24 "chromeos/update_display_configuration_task.cc", |
25 "chromeos/update_display_configuration_task.cc", | 25 "chromeos/update_display_configuration_task.h", |
26 "chromeos/update_display_configuration_task.h", | 26 "chromeos/x11/display_configurator_x11.cc", |
27 "chromeos/x11/display_mode_x11.cc", | |
28 "chromeos/x11/display_mode_x11.h", | |
29 "chromeos/x11/display_snapshot_x11.cc", | |
30 "chromeos/x11/display_snapshot_x11.h", | |
31 "chromeos/x11/display_util_x11.cc", | |
32 "chromeos/x11/display_util_x11.h", | |
33 "chromeos/x11/native_display_delegate_x11.cc", | |
34 "chromeos/x11/native_display_delegate_x11.h", | |
35 "chromeos/x11/native_display_event_dispatcher_x11.cc", | |
36 "chromeos/x11/native_display_event_dispatcher_x11.h", | |
37 "display_export.h", | |
38 "display_switches.cc", | |
39 "display_switches.h", | |
40 "win/display_info.cc", | |
41 "win/display_info.h", | |
42 "win/screen_win.cc", | |
43 "win/screen_win.h", | |
44 "win/screen_win_display.cc", | |
45 "win/screen_win_display.h", | |
46 ] | |
47 | |
48 defines = [ "DISPLAY_IMPLEMENTATION" ] | |
49 | |
50 deps = [ | |
51 "//base", | |
52 "//ui/display/types", | |
53 "//ui/display/util", | |
54 "//ui/gfx", | |
55 "//ui/gfx/geometry", | |
56 ] | |
57 | |
58 if (is_chromeos && use_x11) { | |
59 sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ] | |
60 configs += [ | |
61 "//build/config/linux:x11", | |
62 "//build/config/linux:xext", | |
63 "//build/config/linux:xi", | |
64 "//build/config/linux:xrandr", | |
65 ] | |
66 deps += [ "//ui/events/platform" ] | |
67 } | |
68 | |
69 deps += [] | |
70 if (use_x11) { | |
71 deps += [ "//ui/gfx/x" ] | |
72 } | |
73 | |
74 if (is_chromeos && use_ozone) { | |
75 deps += [ "//ui/ozone" ] | |
76 sources -= [ | |
27 "chromeos/x11/display_configurator_x11.cc", | 77 "chromeos/x11/display_configurator_x11.cc", |
28 "chromeos/x11/display_mode_x11.cc", | 78 "chromeos/x11/display_mode_x11.cc", |
29 "chromeos/x11/display_mode_x11.h", | 79 "chromeos/x11/display_mode_x11.h", |
30 "chromeos/x11/display_snapshot_x11.cc", | 80 "chromeos/x11/display_snapshot_x11.cc", |
31 "chromeos/x11/display_snapshot_x11.h", | 81 "chromeos/x11/display_snapshot_x11.h", |
32 "chromeos/x11/display_util_x11.cc", | 82 "chromeos/x11/display_util_x11.cc", |
33 "chromeos/x11/display_util_x11.h", | 83 "chromeos/x11/display_util_x11.h", |
34 "chromeos/x11/native_display_delegate_x11.cc", | 84 "chromeos/x11/native_display_delegate_x11.cc", |
35 "chromeos/x11/native_display_delegate_x11.h", | 85 "chromeos/x11/native_display_delegate_x11.h", |
36 "chromeos/x11/native_display_event_dispatcher_x11.cc", | 86 "chromeos/x11/native_display_event_dispatcher_x11.cc", |
37 "chromeos/x11/native_display_event_dispatcher_x11.h", | 87 "chromeos/x11/native_display_event_dispatcher_x11.h", |
38 "display_export.h", | |
39 "display_switches.cc", | |
40 "display_switches.h", | |
41 ] | |
42 | |
43 defines = [ "DISPLAY_IMPLEMENTATION" ] | |
44 | |
45 deps = [ | |
46 "//base", | |
47 "//ui/display/types", | |
48 "//ui/display/util", | |
49 "//ui/gfx", | |
50 "//ui/gfx/geometry", | |
51 ] | |
52 | |
53 if (use_x11) { | |
54 sources -= [ "chromeos/ozone/display_configurator_ozone.cc" ] | |
55 configs += [ | |
56 "//build/config/linux:x11", | |
57 "//build/config/linux:xext", | |
58 "//build/config/linux:xi", | |
59 "//build/config/linux:xrandr", | |
60 ] | |
61 deps += [ "//ui/events/platform" ] | |
62 } | |
63 | |
64 deps += [] | |
65 if (use_x11) { | |
66 deps += [ "//ui/gfx/x" ] | |
67 } | |
68 | |
69 if (use_ozone) { | |
70 deps += [ "//ui/ozone" ] | |
71 sources -= [ | |
72 "chromeos/x11/display_configurator_x11.cc", | |
73 "chromeos/x11/display_mode_x11.cc", | |
74 "chromeos/x11/display_mode_x11.h", | |
75 "chromeos/x11/display_snapshot_x11.cc", | |
76 "chromeos/x11/display_snapshot_x11.h", | |
77 "chromeos/x11/display_util_x11.cc", | |
78 "chromeos/x11/display_util_x11.h", | |
79 "chromeos/x11/native_display_delegate_x11.cc", | |
80 "chromeos/x11/native_display_delegate_x11.h", | |
81 "chromeos/x11/native_display_event_dispatcher_x11.cc", | |
82 "chromeos/x11/native_display_event_dispatcher_x11.h", | |
83 ] | |
84 } | |
85 } | |
86 | |
87 component("test_util") { | |
88 output_name = "display_test_util" | |
89 sources = [ | |
90 "chromeos/test/test_display_snapshot.cc", | |
91 "chromeos/test/test_display_snapshot.h", | |
92 ] | |
93 | |
94 defines = [ "DISPLAY_IMPLEMENTATION" ] | |
95 | |
96 public_deps = [ | |
97 ":display", | |
98 ] | |
99 deps = [ | |
100 "//base", | |
101 "//ui/display/types", | |
102 "//ui/gfx", | |
103 "//ui/gfx/geometry", | |
104 ] | |
105 } | |
106 | |
107 source_set("test_support") { | |
108 testonly = true | |
109 sources = [ | |
110 "chromeos/test/action_logger.cc", | |
111 "chromeos/test/action_logger.h", | |
112 "chromeos/test/action_logger_util.cc", | |
113 "chromeos/test/action_logger_util.h", | |
114 "chromeos/test/test_display_layout_manager.cc", | |
115 "chromeos/test/test_display_layout_manager.h", | |
116 "chromeos/test/test_native_display_delegate.cc", | |
117 "chromeos/test/test_native_display_delegate.h", | |
118 ] | |
119 | |
120 public_deps = [ | |
121 ":display", | |
122 ] | |
123 deps = [ | |
124 "//base", | |
125 "//ui/display/types", | |
126 "//ui/gfx", | |
127 "//ui/gfx:test_support", | |
128 "//ui/gfx/geometry", | |
129 ] | 88 ] |
130 } | 89 } |
131 } | 90 } |
132 | 91 |
92 component("test_util") { | |
93 output_name = "display_test_util" | |
94 sources = [ | |
95 "chromeos/test/test_display_snapshot.cc", | |
96 "chromeos/test/test_display_snapshot.h", | |
97 ] | |
98 | |
99 defines = [ "DISPLAY_IMPLEMENTATION" ] | |
100 | |
101 public_deps = [ | |
102 ":display", | |
103 ] | |
104 deps = [ | |
105 "//base", | |
106 "//ui/display/types", | |
107 "//ui/gfx", | |
108 "//ui/gfx/geometry", | |
109 ] | |
110 } | |
111 | |
112 source_set("test_support") { | |
113 testonly = true | |
114 sources = [ | |
115 "chromeos/test/action_logger.cc", | |
116 "chromeos/test/action_logger.h", | |
117 "chromeos/test/action_logger_util.cc", | |
118 "chromeos/test/action_logger_util.h", | |
119 "chromeos/test/test_display_layout_manager.cc", | |
120 "chromeos/test/test_display_layout_manager.h", | |
121 "chromeos/test/test_native_display_delegate.cc", | |
122 "chromeos/test/test_native_display_delegate.h", | |
123 ] | |
124 | |
125 public_deps = [ | |
126 ":display", | |
127 ] | |
128 deps = [ | |
129 "//base", | |
130 "//ui/display/types", | |
131 "//ui/gfx", | |
132 "//ui/gfx:test_support", | |
133 "//ui/gfx/geometry", | |
134 ] | |
135 } | |
136 | |
133 # This test covers the ChromeOS "display" target as well as the cross-platform | 137 # This test covers the ChromeOS "display" target as well as the cross-platform |
sky
2016/03/25 15:59:47
nit: update comment.
robliao
2016/03/26 00:05:46
Done.
| |
134 # //display/util target. | 138 # //display/util target. |
135 test("display_unittests") { | 139 test("display_unittests") { |
sky
2016/03/25 15:59:47
Make sure we actually run this test on windows bot
robliao
2016/03/26 00:05:46
Nice catch. I synchronized display_unittests with
| |
136 sources = [ | 140 sources = [ |
137 "chromeos/apply_content_protection_task_unittest.cc", | 141 "chromeos/apply_content_protection_task_unittest.cc", |
138 "chromeos/configure_displays_task_unittest.cc", | 142 "chromeos/configure_displays_task_unittest.cc", |
139 "chromeos/display_configurator_unittest.cc", | 143 "chromeos/display_configurator_unittest.cc", |
140 "chromeos/query_content_protection_task_unittest.cc", | 144 "chromeos/query_content_protection_task_unittest.cc", |
141 "chromeos/update_display_configuration_task_unittest.cc", | 145 "chromeos/update_display_configuration_task_unittest.cc", |
142 "chromeos/x11/display_util_x11_unittest.cc", | 146 "chromeos/x11/display_util_x11_unittest.cc", |
143 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", | 147 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", |
144 "util/display_util_unittest.cc", | 148 "util/display_util_unittest.cc", |
145 "util/edid_parser_unittest.cc", | 149 "util/edid_parser_unittest.cc", |
150 "win/screen_win_unittest.cc", | |
146 ] | 151 ] |
147 | 152 |
148 deps = [ | 153 deps = [ |
154 ":display", | |
149 "//base", | 155 "//base", |
150 "//base/test:run_all_unittests", | 156 "//base/test:run_all_unittests", |
157 "//base/test:test_support", | |
151 "//testing/gtest", | 158 "//testing/gtest", |
159 "//ui/display/types", | |
152 "//ui/display/util", | 160 "//ui/display/util", |
161 "//ui/gfx:test_support", | |
153 "//ui/gfx/geometry", | 162 "//ui/gfx/geometry", |
154 ] | 163 ] |
155 | 164 |
156 if (is_chromeos) { | 165 if (is_chromeos) { |
157 deps += [ | 166 deps += [ |
158 ":display", | |
159 ":test_support", | 167 ":test_support", |
160 ":test_util", | 168 ":test_util", |
161 "//base/test:test_support", | |
162 "//ui/display/types", | |
163 ] | 169 ] |
164 } | 170 } |
165 | 171 |
166 if (use_ozone && is_chromeos) { | 172 if (is_chromeos && use_ozone) { |
167 sources -= [ | 173 sources -= [ |
168 "chromeos/x11/display_util_x11_unittest.cc", | 174 "chromeos/x11/display_util_x11_unittest.cc", |
169 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", | 175 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", |
170 ] | 176 ] |
171 } | 177 } |
172 } | 178 } |
OLD | NEW |