| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // As a side effect, this allocates Displays. | 56 // As a side effect, this allocates Displays. |
| 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)->root(); | 66 return display->GetWindowManagerDisplayRootForUser(kTestId1) |
| 67 ->GetClientVisibileRoot(); |
| 67 } | 68 } |
| 68 | 69 |
| 69 // 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. |
| 70 ServerWindow* BuildServerWindow() { | 71 ServerWindow* BuildServerWindow() { |
| 71 DisplayManager* display_manager = window_server()->display_manager(); | 72 DisplayManager* display_manager = window_server()->display_manager(); |
| 72 Display* display = *display_manager->displays().begin(); | 73 Display* display = *display_manager->displays().begin(); |
| 73 WindowManagerDisplayRoot* active_display_root = | 74 WindowManagerDisplayRoot* active_display_root = |
| 74 display->GetActiveWindowManagerDisplayRoot(); | 75 display->GetActiveWindowManagerDisplayRoot(); |
| 75 WindowTree* tree = | 76 WindowTree* tree = |
| 76 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... |
| 189 MoveCursorTo(gfx::Point(15, 15)); | 190 MoveCursorTo(gfx::Point(15, 15)); |
| 190 EXPECT_EQ(ui::CursorType::kEastResize, cursor_type()); | 191 EXPECT_EQ(ui::CursorType::kEastResize, cursor_type()); |
| 191 | 192 |
| 192 win->SetBounds(gfx::Rect(0, 0, 30, 30)); | 193 win->SetBounds(gfx::Rect(0, 0, 30, 30)); |
| 193 EXPECT_EQ(ui::CursorType::kCopy, cursor_type()); | 194 EXPECT_EQ(ui::CursorType::kCopy, cursor_type()); |
| 194 } | 195 } |
| 195 | 196 |
| 196 } // namespace test | 197 } // namespace test |
| 197 } // namespace ws | 198 } // namespace ws |
| 198 } // namespace ui | 199 } // namespace ui |
| OLD | NEW |