Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: services/ui/ws/cursor_unittest.cc

Issue 2481013008: Delete WindowManagerWindowTreeFactorySetTestApi. (Closed)
Patch Set: Make const ref. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | services/ui/ws/display_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 window_server_delegate()->CreateDisplays(1); 52 window_server_delegate()->CreateDisplays(1);
53 53
54 // As a side effect, this allocates Displays. 54 // As a side effect, this allocates Displays.
55 WindowManagerWindowTreeFactorySetTestApi( 55 AddWindowManager(window_server(), kTestId1);
56 window_server()->window_manager_window_tree_factory_set())
57 .Add(kTestId1);
58 window_server()->user_id_tracker()->AddUserId(kTestId1); 56 window_server()->user_id_tracker()->AddUserId(kTestId1);
59 window_server()->user_id_tracker()->SetActiveUserId(kTestId1); 57 window_server()->user_id_tracker()->SetActiveUserId(kTestId1);
60 } 58 }
61 59
62 ServerWindow* GetRoot() { 60 ServerWindow* GetRoot() {
63 DisplayManager* display_manager = window_server()->display_manager(); 61 DisplayManager* display_manager = window_server()->display_manager();
64 // ASSERT_EQ(1u, display_manager->displays().size()); 62 // ASSERT_EQ(1u, display_manager->displays().size());
65 Display* display = *display_manager->displays().begin(); 63 Display* display = *display_manager->displays().begin();
66 return display->GetWindowManagerDisplayRootForUser(kTestId1)->root(); 64 return display->GetWindowManagerDisplayRootForUser(kTestId1)->root();
67 } 65 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 MoveCursorTo(gfx::Point(15, 15)); 177 MoveCursorTo(gfx::Point(15, 15));
180 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, cursor()); 178 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, cursor());
181 179
182 win->SetBounds(gfx::Rect(0, 0, 30, 30)); 180 win->SetBounds(gfx::Rect(0, 0, 30, 30));
183 EXPECT_EQ(mojom::Cursor::IBEAM, cursor()); 181 EXPECT_EQ(mojom::Cursor::IBEAM, cursor());
184 } 182 }
185 183
186 } // namespace test 184 } // namespace test
187 } // namespace ws 185 } // namespace ws
188 } // namespace ui 186 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | services/ui/ws/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698