| 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 component("display") { | 8 component("display") { |
| 9 sources = [ | 9 sources = [ |
| 10 "chromeos/apply_content_protection_task.cc", | |
| 11 "chromeos/apply_content_protection_task.h", | |
| 12 "chromeos/configure_displays_task.cc", | |
| 13 "chromeos/configure_displays_task.h", | |
| 14 "chromeos/display_configurator.cc", | |
| 15 "chromeos/display_configurator.h", | |
| 16 "chromeos/display_layout_manager.h", | |
| 17 "chromeos/display_snapshot_virtual.cc", | |
| 18 "chromeos/display_snapshot_virtual.h", | |
| 19 "chromeos/display_util.cc", | |
| 20 "chromeos/display_util.h", | |
| 21 "chromeos/query_content_protection_task.cc", | |
| 22 "chromeos/query_content_protection_task.h", | |
| 23 "chromeos/touchscreen_util.cc", | |
| 24 "chromeos/touchscreen_util.h", | |
| 25 "chromeos/update_display_configuration_task.cc", | |
| 26 "chromeos/update_display_configuration_task.h", | |
| 27 "display.cc", | 10 "display.cc", |
| 28 "display.h", | 11 "display.h", |
| 29 "display_change_notifier.cc", | 12 "display_change_notifier.cc", |
| 30 "display_change_notifier.h", | 13 "display_change_notifier.h", |
| 31 "display_export.h", | 14 "display_export.h", |
| 32 "display_finder.cc", | 15 "display_finder.cc", |
| 33 "display_finder.h", | 16 "display_finder.h", |
| 34 "display_list.cc", | 17 "display_list.cc", |
| 35 "display_list.h", | 18 "display_list.h", |
| 36 "display_observer.cc", | 19 "display_observer.cc", |
| 37 "display_observer.h", | 20 "display_observer.h", |
| 38 "display_switches.cc", | 21 "display_switches.cc", |
| 39 "display_switches.h", | 22 "display_switches.h", |
| 40 "fake_display_delegate.cc", | 23 "fake_display_delegate.cc", |
| 41 "fake_display_delegate.h", | 24 "fake_display_delegate.h", |
| 42 "fake_display_snapshot.cc", | 25 "fake_display_snapshot.cc", |
| 43 "fake_display_snapshot.h", | 26 "fake_display_snapshot.h", |
| 44 "ios/screen_ios.mm", | 27 "ios/screen_ios.mm", |
| 45 "mac/screen_mac.mm", | 28 "mac/screen_mac.mm", |
| 46 "manager/display_layout.cc", | |
| 47 "manager/display_layout.h", | |
| 48 "manager/display_layout_builder.cc", | |
| 49 "manager/display_layout_builder.h", | |
| 50 "manager/display_layout_store.cc", | |
| 51 "manager/display_layout_store.h", | |
| 52 "manager/display_manager.cc", | |
| 53 "manager/display_manager.h", | |
| 54 "manager/display_manager_utilities.cc", | |
| 55 "manager/display_manager_utilities.h", | |
| 56 "manager/managed_display_info.cc", | |
| 57 "manager/managed_display_info.h", | |
| 58 "screen.cc", | 29 "screen.cc", |
| 59 "screen.h", | 30 "screen.h", |
| 60 "screen_aura.cc", | 31 "screen_aura.cc", |
| 61 "screen_base.cc", | 32 "screen_base.cc", |
| 62 "screen_base.h", | 33 "screen_base.h", |
| 63 "win/display_info.cc", | 34 "win/display_info.cc", |
| 64 "win/display_info.h", | 35 "win/display_info.h", |
| 65 "win/dpi.cc", | 36 "win/dpi.cc", |
| 66 "win/dpi.h", | 37 "win/dpi.h", |
| 67 "win/scaling_util.cc", | 38 "win/scaling_util.cc", |
| 68 "win/scaling_util.h", | 39 "win/scaling_util.h", |
| 69 "win/screen_win.cc", | 40 "win/screen_win.cc", |
| 70 "win/screen_win.h", | 41 "win/screen_win.h", |
| 71 "win/screen_win_display.cc", | 42 "win/screen_win_display.cc", |
| 72 "win/screen_win_display.h", | 43 "win/screen_win_display.h", |
| 73 ] | 44 ] |
| 74 | 45 |
| 75 defines = [ "DISPLAY_IMPLEMENTATION" ] | 46 defines = [ "DISPLAY_IMPLEMENTATION" ] |
| 76 | 47 |
| 77 public_deps = [ | 48 public_deps = [ |
| 78 "//ui/display/types", | 49 "//ui/display/types", |
| 79 "//ui/gfx:gfx", | 50 "//ui/gfx:gfx", |
| 80 ] | 51 ] |
| 81 | 52 |
| 82 deps = [ | 53 deps = [ |
| 83 "//base", | 54 "//base", |
| 84 "//third_party/re2", | 55 "//third_party/re2", |
| 85 "//ui/display/util", | 56 "//ui/display/util", |
| 86 "//ui/events/devices", | |
| 87 "//ui/gfx", | 57 "//ui/gfx", |
| 88 "//ui/gfx/geometry", | 58 "//ui/gfx/geometry", |
| 89 ] | 59 ] |
| 90 | 60 |
| 91 if (is_chromeos && use_x11) { | |
| 92 sources += [ | |
| 93 "chromeos/x11/display_mode_x11.cc", | |
| 94 "chromeos/x11/display_mode_x11.h", | |
| 95 "chromeos/x11/display_snapshot_x11.cc", | |
| 96 "chromeos/x11/display_snapshot_x11.h", | |
| 97 "chromeos/x11/display_util_x11.cc", | |
| 98 "chromeos/x11/display_util_x11.h", | |
| 99 "chromeos/x11/native_display_delegate_x11.cc", | |
| 100 "chromeos/x11/native_display_delegate_x11.h", | |
| 101 "chromeos/x11/native_display_event_dispatcher_x11.cc", | |
| 102 "chromeos/x11/native_display_event_dispatcher_x11.h", | |
| 103 ] | |
| 104 | |
| 105 configs += [ | |
| 106 "//build/config/linux:x11", | |
| 107 "//build/config/linux:xext", | |
| 108 "//build/config/linux:xi", | |
| 109 "//build/config/linux:xrandr", | |
| 110 ] | |
| 111 | |
| 112 deps += [ "//ui/events/platform" ] | |
| 113 } | |
| 114 | |
| 115 if (use_x11) { | |
| 116 deps += [ "//ui/gfx/x" ] | |
| 117 } | |
| 118 | |
| 119 if (!use_aura) { | 61 if (!use_aura) { |
| 120 sources -= [ "screen_aura.cc" ] | 62 sources -= [ "screen_aura.cc" ] |
| 121 } | 63 } |
| 122 | 64 |
| 123 if (is_mac) { | 65 if (is_mac) { |
| 124 libs = [ | 66 libs = [ |
| 125 "AppKit.framework", | 67 "AppKit.framework", |
| 126 "CoreGraphics.framework", | 68 "CoreGraphics.framework", |
| 127 ] | 69 ] |
| 128 } | 70 } |
| 129 } | 71 } |
| 130 | 72 |
| 131 component("display_manager_test_api") { | 73 component("display_manager_test_api") { |
| 132 testonly = true | 74 testonly = true |
| 133 sources = [ | 75 sources = [ |
| 134 "test/display_manager_test_api.cc", | 76 "test/display_manager_test_api.cc", |
| 135 "test/display_manager_test_api.h", | 77 "test/display_manager_test_api.h", |
| 136 ] | 78 ] |
| 137 | 79 |
| 138 defines = [ "DISPLAY_IMPLEMENTATION" ] | 80 defines = [ "DISPLAY_IMPLEMENTATION" ] |
| 139 | 81 |
| 140 public_deps = [ | 82 public_deps = [ |
| 141 ":display", | 83 "//ui/display/manager", |
| 142 ] | 84 ] |
| 143 | 85 |
| 144 deps = [ | 86 deps = [ |
| 145 "//base", | 87 "//base", |
| 146 "//ui/display", | 88 "//ui/display", |
| 147 "//ui/display/types", | 89 "//ui/display/types", |
| 148 ] | 90 ] |
| 149 } | 91 } |
| 150 | 92 |
| 151 static_library("test_support") { | 93 static_library("test_support") { |
| 152 testonly = true | 94 testonly = true |
| 153 sources = [ | 95 sources = [ |
| 154 "chromeos/test/action_logger.cc", | 96 "manager/chromeos/test/action_logger.cc", |
| 155 "chromeos/test/action_logger.h", | 97 "manager/chromeos/test/action_logger.h", |
| 156 "chromeos/test/action_logger_util.cc", | 98 "manager/chromeos/test/action_logger_util.cc", |
| 157 "chromeos/test/action_logger_util.h", | 99 "manager/chromeos/test/action_logger_util.h", |
| 158 "chromeos/test/test_display_layout_manager.cc", | 100 "manager/chromeos/test/test_display_layout_manager.cc", |
| 159 "chromeos/test/test_display_layout_manager.h", | 101 "manager/chromeos/test/test_display_layout_manager.h", |
| 160 "chromeos/test/test_native_display_delegate.cc", | 102 "manager/chromeos/test/test_native_display_delegate.cc", |
| 161 "chromeos/test/test_native_display_delegate.h", | 103 "manager/chromeos/test/test_native_display_delegate.h", |
| 162 "test/display_matchers.cc", | 104 "test/display_matchers.cc", |
| 163 "test/display_matchers.h", | 105 "test/display_matchers.h", |
| 164 "test/display_test_util.h", | 106 "test/display_test_util.h", |
| 165 "test/test_screen.cc", | 107 "test/test_screen.cc", |
| 166 "test/test_screen.h", | 108 "test/test_screen.h", |
| 167 "win/test/screen_util_win.cc", | 109 "win/test/screen_util_win.cc", |
| 168 "win/test/screen_util_win.h", | 110 "win/test/screen_util_win.h", |
| 169 ] | 111 ] |
| 170 | 112 |
| 171 public_deps = [ | 113 public_deps = [ |
| 172 ":display", | 114 ":display", |
| 115 "//ui/display/manager", |
| 173 ] | 116 ] |
| 174 deps = [ | 117 deps = [ |
| 175 "//base", | 118 "//base", |
| 176 "//testing/gmock", | 119 "//testing/gmock", |
| 177 "//ui/display/types", | 120 "//ui/display/types", |
| 178 "//ui/gfx", | 121 "//ui/gfx", |
| 179 "//ui/gfx:test_support", | 122 "//ui/gfx:test_support", |
| 180 "//ui/gfx/geometry", | 123 "//ui/gfx/geometry", |
| 181 ] | 124 ] |
| 182 } | 125 } |
| 183 | 126 |
| 184 # This test covers all testable components in display. | 127 # This test covers all testable components in display. |
| 185 test("display_unittests") { | 128 test("display_unittests") { |
| 186 sources = [ | 129 sources = [ |
| 187 "chromeos/apply_content_protection_task_unittest.cc", | |
| 188 "chromeos/configure_displays_task_unittest.cc", | |
| 189 "chromeos/display_configurator_unittest.cc", | |
| 190 "chromeos/query_content_protection_task_unittest.cc", | |
| 191 "chromeos/touchscreen_util_unittest.cc", | |
| 192 "chromeos/update_display_configuration_task_unittest.cc", | |
| 193 "display_change_notifier_unittest.cc", | 130 "display_change_notifier_unittest.cc", |
| 194 "display_list_unittest.cc", | 131 "display_list_unittest.cc", |
| 195 "display_unittest.cc", | 132 "display_unittest.cc", |
| 196 "fake_display_snapshot_unittests.cc", | 133 "fake_display_snapshot_unittests.cc", |
| 134 "manager/chromeos/apply_content_protection_task_unittest.cc", |
| 135 "manager/chromeos/configure_displays_task_unittest.cc", |
| 136 "manager/chromeos/display_configurator_unittest.cc", |
| 137 "manager/chromeos/query_content_protection_task_unittest.cc", |
| 138 "manager/chromeos/touchscreen_util_unittest.cc", |
| 139 "manager/chromeos/update_display_configuration_task_unittest.cc", |
| 197 "manager/display_layout_builder_unittest.cc", | 140 "manager/display_layout_builder_unittest.cc", |
| 198 "manager/display_layout_unittest.cc", | 141 "manager/display_layout_unittest.cc", |
| 199 "manager/display_manager_utilities_unittest.cc", | 142 "manager/display_manager_utilities_unittest.cc", |
| 200 "manager/managed_display_info_unittest.cc", | 143 "manager/managed_display_info_unittest.cc", |
| 201 "screen_unittest.cc", | 144 "screen_unittest.cc", |
| 202 "util/display_util_unittest.cc", | 145 "util/display_util_unittest.cc", |
| 203 "util/edid_parser_unittest.cc", | 146 "util/edid_parser_unittest.cc", |
| 204 "win/scaling_util_unittest.cc", | 147 "win/scaling_util_unittest.cc", |
| 205 "win/screen_win_unittest.cc", | 148 "win/screen_win_unittest.cc", |
| 206 ] | 149 ] |
| 207 | 150 |
| 208 deps = [ | 151 deps = [ |
| 209 ":display", | 152 ":display", |
| 210 ":display_manager_test_api", | 153 ":display_manager_test_api", |
| 211 ":test_support", | 154 ":test_support", |
| 212 "//base", | 155 "//base", |
| 213 "//base/test:run_all_unittests", | 156 "//base/test:run_all_unittests", |
| 214 "//base/test:test_support", | 157 "//base/test:test_support", |
| 215 "//testing/gmock", | 158 "//testing/gmock", |
| 216 "//testing/gtest", | 159 "//testing/gtest", |
| 160 "//ui/display/manager", |
| 217 "//ui/display/types", | 161 "//ui/display/types", |
| 218 "//ui/display/util", | 162 "//ui/display/util", |
| 219 "//ui/events/devices", | 163 "//ui/events/devices", |
| 220 "//ui/gfx:test_support", | 164 "//ui/gfx:test_support", |
| 221 "//ui/gfx/geometry", | 165 "//ui/gfx/geometry", |
| 222 ] | 166 ] |
| 223 | 167 |
| 224 if (is_android) { | 168 if (is_android) { |
| 225 # Do not run display_change_notifier_unittest.cc on Android because it | 169 # Do not run display_change_notifier_unittest.cc on Android because it |
| 226 # does not compile display_observer.cc | 170 # does not compile display_observer.cc |
| 227 sources -= [ "display_change_notifier_unittest.cc" ] | 171 sources -= [ "display_change_notifier_unittest.cc" ] |
| 228 } | 172 } |
| 229 | 173 |
| 230 if (is_chromeos && use_x11) { | 174 if (is_chromeos && use_x11) { |
| 231 sources += [ | 175 sources += [ |
| 232 "chromeos/x11/display_util_x11_unittest.cc", | 176 "manager/chromeos/x11/display_util_x11_unittest.cc", |
| 233 "chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", | 177 "manager/chromeos/x11/native_display_event_dispatcher_x11_unittest.cc", |
| 234 ] | 178 ] |
| 235 } | 179 } |
| 236 } | 180 } |
| OLD | NEW |