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

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

Issue 2484223006: Remove CreateDefaultDisplay(). (Closed)
Patch Set: Remove debug LOG. 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 | « services/ui/service.cc ('k') | 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 window_server_delegate()->set_num_displays_to_create(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 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()->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() {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « services/ui/service.cc ('k') | services/ui/ws/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698