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

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

Issue 2274353003: Add PlatformScreenDelegate and start implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes for comments. Created 4 years, 3 months 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/ws/BUILD.gn ('k') | services/ui/ws/display_manager.h » ('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 26 matching lines...) Expand all
37 37
38 class CursorTest : public testing::Test { 38 class CursorTest : public testing::Test {
39 public: 39 public:
40 CursorTest() : cursor_id_(-1), platform_display_factory_(&cursor_id_) {} 40 CursorTest() : cursor_id_(-1), platform_display_factory_(&cursor_id_) {}
41 ~CursorTest() override {} 41 ~CursorTest() override {}
42 42
43 protected: 43 protected:
44 // testing::Test: 44 // testing::Test:
45 void SetUp() override { 45 void SetUp() override {
46 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); 46 PlatformDisplay::set_factory_for_testing(&platform_display_factory_);
47 window_server_.reset( 47 window_server_.reset(new WindowServer(&window_server_delegate_));
48 new WindowServer(&window_server_delegate_,
49 scoped_refptr<SurfacesState>(new SurfacesState)));
50 window_server_delegate_.set_window_server(window_server_.get()); 48 window_server_delegate_.set_window_server(window_server_.get());
51 49
52 window_server_delegate_.set_num_displays_to_create(1); 50 window_server_delegate_.set_num_displays_to_create(1);
53 51
54 // As a side effect, this allocates Displays. 52 // As a side effect, this allocates Displays.
55 WindowManagerWindowTreeFactorySetTestApi( 53 WindowManagerWindowTreeFactorySetTestApi(
56 window_server_->window_manager_window_tree_factory_set()) 54 window_server_->window_manager_window_tree_factory_set())
57 .Add(kTestId1); 55 .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);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 MoveCursorTo(gfx::Point(15, 15)); 187 MoveCursorTo(gfx::Point(15, 15));
190 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, mojom::Cursor(cursor_id_)); 188 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, mojom::Cursor(cursor_id_));
191 189
192 win->SetBounds(gfx::Rect(0, 0, 30, 30)); 190 win->SetBounds(gfx::Rect(0, 0, 30, 30));
193 EXPECT_EQ(mojom::Cursor::IBEAM, mojom::Cursor(cursor_id_)); 191 EXPECT_EQ(mojom::Cursor::IBEAM, mojom::Cursor(cursor_id_));
194 } 192 }
195 193
196 } // namespace test 194 } // namespace test
197 } // namespace ws 195 } // namespace ws
198 } // namespace ui 196 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/BUILD.gn ('k') | services/ui/ws/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698