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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 AddWindowManager(window_server(), kTestId1); | 57 AddWindowManager(window_server(), kTestId1); |
58 window_server()->user_id_tracker()->AddUserId(kTestId1); | 58 window_server()->user_id_tracker()->AddUserId(kTestId1); |
59 window_server()->user_id_tracker()->SetActiveUserId(kTestId1); | 59 window_server()->user_id_tracker()->SetActiveUserId(kTestId1); |
60 } | 60 } |
61 | 61 |
62 ServerWindow* GetRoot() { | 62 ServerWindow* GetRoot() { |
63 DisplayManager* display_manager = window_server()->display_manager(); | 63 DisplayManager* display_manager = window_server()->display_manager(); |
64 // ASSERT_EQ(1u, display_manager->displays().size()); | 64 // ASSERT_EQ(1u, display_manager->displays().size()); |
65 Display* display = *display_manager->displays().begin(); | 65 Display* display = *display_manager->displays().begin(); |
66 return display->GetWindowManagerDisplayRootForUser(kTestId1) | 66 return display->GetWindowManagerDisplayRootForUser(kTestId1) |
67 ->GetClientVisibileRoot(); | 67 ->GetClientVisibleRoot(); |
68 } | 68 } |
69 | 69 |
70 // Create a 30x30 window where the outer 10 pixels is non-client. | 70 // Create a 30x30 window where the outer 10 pixels is non-client. |
71 ServerWindow* BuildServerWindow() { | 71 ServerWindow* BuildServerWindow() { |
72 DisplayManager* display_manager = window_server()->display_manager(); | 72 DisplayManager* display_manager = window_server()->display_manager(); |
73 Display* display = *display_manager->displays().begin(); | 73 Display* display = *display_manager->displays().begin(); |
74 WindowManagerDisplayRoot* active_display_root = | 74 WindowManagerDisplayRoot* active_display_root = |
75 display->GetActiveWindowManagerDisplayRoot(); | 75 display->GetActiveWindowManagerDisplayRoot(); |
76 WindowTree* tree = | 76 WindowTree* tree = |
77 active_display_root->window_manager_state()->window_tree(); | 77 active_display_root->window_manager_state()->window_tree(); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 MoveCursorTo(gfx::Point(15, 15)); | 190 MoveCursorTo(gfx::Point(15, 15)); |
191 EXPECT_EQ(ui::CursorType::kEastResize, cursor_type()); | 191 EXPECT_EQ(ui::CursorType::kEastResize, cursor_type()); |
192 | 192 |
193 win->SetBounds(gfx::Rect(0, 0, 30, 30)); | 193 win->SetBounds(gfx::Rect(0, 0, 30, 30)); |
194 EXPECT_EQ(ui::CursorType::kCopy, cursor_type()); | 194 EXPECT_EQ(ui::CursorType::kCopy, cursor_type()); |
195 } | 195 } |
196 | 196 |
197 } // namespace test | 197 } // namespace test |
198 } // namespace ws | 198 } // namespace ws |
199 } // namespace ui | 199 } // namespace ui |
OLD | NEW |