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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 WindowServer* window_server() { return ws_test_helper_.window_server(); } | 42 WindowServer* window_server() { return ws_test_helper_.window_server(); } |
43 TestWindowServerDelegate* window_server_delegate() { | 43 TestWindowServerDelegate* window_server_delegate() { |
44 return ws_test_helper_.window_server_delegate(); | 44 return ws_test_helper_.window_server_delegate(); |
45 } | 45 } |
46 mojom::Cursor cursor() const { return ws_test_helper_.cursor(); } | 46 mojom::Cursor cursor() const { return ws_test_helper_.cursor(); } |
47 | 47 |
48 protected: | 48 protected: |
49 // testing::Test: | 49 // testing::Test: |
50 void SetUp() override { | 50 void SetUp() override { |
51 screen_manager_.Init(window_server()->display_manager()); | 51 screen_manager_.Init(window_server()->display_manager(), |
| 52 display::ScreenManager::WINDOW_MODE_INTERNAL); |
52 screen_manager_.AddDisplay(); | 53 screen_manager_.AddDisplay(); |
53 | 54 |
54 // As a side effect, this allocates Displays. | 55 // As a side effect, this allocates Displays. |
55 AddWindowManager(window_server(), kTestId1); | 56 AddWindowManager(window_server(), kTestId1); |
56 window_server()->user_id_tracker()->AddUserId(kTestId1); | 57 window_server()->user_id_tracker()->AddUserId(kTestId1); |
57 window_server()->user_id_tracker()->SetActiveUserId(kTestId1); | 58 window_server()->user_id_tracker()->SetActiveUserId(kTestId1); |
58 } | 59 } |
59 | 60 |
60 ServerWindow* GetRoot() { | 61 ServerWindow* GetRoot() { |
61 DisplayManager* display_manager = window_server()->display_manager(); | 62 DisplayManager* display_manager = window_server()->display_manager(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 MoveCursorTo(gfx::Point(15, 15)); | 179 MoveCursorTo(gfx::Point(15, 15)); |
179 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, cursor()); | 180 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, cursor()); |
180 | 181 |
181 win->SetBounds(gfx::Rect(0, 0, 30, 30)); | 182 win->SetBounds(gfx::Rect(0, 0, 30, 30)); |
182 EXPECT_EQ(mojom::Cursor::IBEAM, cursor()); | 183 EXPECT_EQ(mojom::Cursor::IBEAM, cursor()); |
183 } | 184 } |
184 | 185 |
185 } // namespace test | 186 } // namespace test |
186 } // namespace ws | 187 } // namespace ws |
187 } // namespace ui | 188 } // namespace ui |
OLD | NEW |