OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "services/ui/ws/user_display_manager.h" | 5 #include "services/ui/ws/user_display_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 TestWindowServerDelegate* window_server_delegate() { | 109 TestWindowServerDelegate* window_server_delegate() { |
110 return ws_test_helper_.window_server_delegate(); | 110 return ws_test_helper_.window_server_delegate(); |
111 } | 111 } |
112 | 112 |
113 TestScreenManager& screen_manager() { return screen_manager_; } | 113 TestScreenManager& screen_manager() { return screen_manager_; } |
114 | 114 |
115 private: | 115 private: |
116 // testing::Test: | 116 // testing::Test: |
117 void SetUp() override { | 117 void SetUp() override { |
118 TaskRunnerTestBase::SetUp(); | 118 TaskRunnerTestBase::SetUp(); |
119 screen_manager_.Init(window_server()->display_manager()); | 119 screen_manager_.Init(window_server()->display_manager(), |
| 120 display::ScreenManager::WINDOW_MODE_INTERNAL); |
120 } | 121 } |
121 | 122 |
122 WindowServerTestHelper ws_test_helper_; | 123 WindowServerTestHelper ws_test_helper_; |
123 TestScreenManager screen_manager_; | 124 TestScreenManager screen_manager_; |
124 DISALLOW_COPY_AND_ASSIGN(UserDisplayManagerTest); | 125 DISALLOW_COPY_AND_ASSIGN(UserDisplayManagerTest); |
125 }; | 126 }; |
126 | 127 |
127 TEST_F(UserDisplayManagerTest, OnlyNotifyWhenFrameDecorationsSet) { | 128 TEST_F(UserDisplayManagerTest, OnlyNotifyWhenFrameDecorationsSet) { |
128 screen_manager().AddDisplay(); | 129 screen_manager().AddDisplay(); |
129 | 130 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 base::subtle::Atomic32 location = | 235 base::subtle::Atomic32 location = |
235 base::subtle::NoBarrier_Load(cursor_location_memory); | 236 base::subtle::NoBarrier_Load(cursor_location_memory); |
236 EXPECT_EQ(gfx::Point(static_cast<int16_t>(location >> 16), | 237 EXPECT_EQ(gfx::Point(static_cast<int16_t>(location >> 16), |
237 static_cast<int16_t>(location & 0xFFFF)), | 238 static_cast<int16_t>(location & 0xFFFF)), |
238 gfx::Point(-10, -11)); | 239 gfx::Point(-10, -11)); |
239 } | 240 } |
240 | 241 |
241 } // namespace test | 242 } // namespace test |
242 } // namespace ws | 243 } // namespace ws |
243 } // namespace ui | 244 } // namespace ui |
OLD | NEW |