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