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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 new WindowServer(&window_server_delegate_, | 48 new WindowServer(&window_server_delegate_, |
49 scoped_refptr<SurfacesState>(new SurfacesState))); | 49 scoped_refptr<SurfacesState>(new SurfacesState))); |
50 window_server_delegate_.set_window_server(window_server_.get()); | 50 window_server_delegate_.set_window_server(window_server_.get()); |
51 | 51 |
52 window_server_delegate_.set_num_displays_to_create(1); | 52 window_server_delegate_.set_num_displays_to_create(1); |
53 | 53 |
54 // As a side effect, this allocates Displays. | 54 // As a side effect, this allocates Displays. |
55 WindowManagerWindowTreeFactorySetTestApi( | 55 WindowManagerWindowTreeFactorySetTestApi( |
56 window_server_->window_manager_window_tree_factory_set()) | 56 window_server_->window_manager_window_tree_factory_set()) |
57 .Add(kTestId1); | 57 .Add(kTestId1); |
| 58 window_server_->user_id_tracker()->AddUserId(kTestId1); |
58 window_server_->user_id_tracker()->SetActiveUserId(kTestId1); | 59 window_server_->user_id_tracker()->SetActiveUserId(kTestId1); |
59 } | 60 } |
60 | 61 |
61 ServerWindow* GetRoot() { | 62 ServerWindow* GetRoot() { |
62 DisplayManager* display_manager = window_server_->display_manager(); | 63 DisplayManager* display_manager = window_server_->display_manager(); |
63 // ASSERT_EQ(1u, display_manager->displays().size()); | 64 // ASSERT_EQ(1u, display_manager->displays().size()); |
64 Display* display = *display_manager->displays().begin(); | 65 Display* display = *display_manager->displays().begin(); |
65 return display->GetWindowManagerDisplayRootForUser(kTestId1)->root(); | 66 return display->GetWindowManagerDisplayRootForUser(kTestId1)->root(); |
66 } | 67 } |
67 | 68 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 MoveCursorTo(gfx::Point(15, 15)); | 189 MoveCursorTo(gfx::Point(15, 15)); |
189 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, mojom::Cursor(cursor_id_)); | 190 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, mojom::Cursor(cursor_id_)); |
190 | 191 |
191 win->SetBounds(gfx::Rect(0, 0, 30, 30)); | 192 win->SetBounds(gfx::Rect(0, 0, 30, 30)); |
192 EXPECT_EQ(mojom::Cursor::IBEAM, mojom::Cursor(cursor_id_)); | 193 EXPECT_EQ(mojom::Cursor::IBEAM, mojom::Cursor(cursor_id_)); |
193 } | 194 } |
194 | 195 |
195 } // namespace test | 196 } // namespace test |
196 } // namespace ws | 197 } // namespace ws |
197 } // namespace mus | 198 } // namespace mus |
OLD | NEW |