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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |