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

Side by Side Diff: services/ui/ws/user_display_manager_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/user_display_manager_delegate.h ('k') | services/ui/ws/window_server.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/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 class UserDisplayManagerTest : public testing::Test { 92 class UserDisplayManagerTest : public testing::Test {
93 public: 93 public:
94 UserDisplayManagerTest() 94 UserDisplayManagerTest()
95 : cursor_id_(0), platform_display_factory_(&cursor_id_) {} 95 : cursor_id_(0), platform_display_factory_(&cursor_id_) {}
96 ~UserDisplayManagerTest() override {} 96 ~UserDisplayManagerTest() override {}
97 97
98 protected: 98 protected:
99 // testing::Test: 99 // testing::Test:
100 void SetUp() override { 100 void SetUp() override {
101 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); 101 PlatformDisplay::set_factory_for_testing(&platform_display_factory_);
102 window_server_.reset(new WindowServer(&window_server_delegate_, 102 window_server_.reset(new WindowServer(&window_server_delegate_));
103 scoped_refptr<SurfacesState>()));
104 window_server_delegate_.set_window_server(window_server_.get()); 103 window_server_delegate_.set_window_server(window_server_.get());
105 } 104 }
106 105
107 protected: 106 protected:
108 int32_t cursor_id_; 107 int32_t cursor_id_;
109 TestPlatformDisplayFactory platform_display_factory_; 108 TestPlatformDisplayFactory platform_display_factory_;
110 TestWindowServerDelegate window_server_delegate_; 109 TestWindowServerDelegate window_server_delegate_;
111 std::unique_ptr<WindowServer> window_server_; 110 std::unique_ptr<WindowServer> window_server_;
112 base::MessageLoop message_loop_; 111 base::MessageLoop message_loop_;
113 112
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 base::subtle::Atomic32 location = 234 base::subtle::Atomic32 location =
236 base::subtle::NoBarrier_Load(cursor_location_memory); 235 base::subtle::NoBarrier_Load(cursor_location_memory);
237 EXPECT_EQ(gfx::Point(static_cast<int16_t>(location >> 16), 236 EXPECT_EQ(gfx::Point(static_cast<int16_t>(location >> 16),
238 static_cast<int16_t>(location & 0xFFFF)), 237 static_cast<int16_t>(location & 0xFFFF)),
239 gfx::Point(-10, -11)); 238 gfx::Point(-10, -11));
240 } 239 }
241 240
242 } // namespace test 241 } // namespace test
243 } // namespace ws 242 } // namespace ws
244 } // namespace ui 243 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/user_display_manager_delegate.h ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698