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

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

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Determine external window mode in mus-ws based on if a WM is connected 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
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 WindowServer* window_server() { return ws_test_helper_.window_server(); } 102 WindowServer* window_server() { return ws_test_helper_.window_server(); }
103 TestWindowServerDelegate* window_server_delegate() { 103 TestWindowServerDelegate* window_server_delegate() {
104 return ws_test_helper_.window_server_delegate(); 104 return ws_test_helper_.window_server_delegate();
105 } 105 }
106 106
107 TestPlatformScreen& platform_screen() { return platform_screen_; } 107 TestPlatformScreen& platform_screen() { return platform_screen_; }
108 108
109 private: 109 private:
110 // testing::Test: 110 // testing::Test:
111 void SetUp() override { 111 void SetUp() override {
112 platform_screen_.Init(window_server()->display_manager()); 112 platform_screen_.Init(window_server()->display_manager(), false);
113 } 113 }
114 114
115 WindowServerTestHelper ws_test_helper_; 115 WindowServerTestHelper ws_test_helper_;
116 TestPlatformScreen platform_screen_; 116 TestPlatformScreen platform_screen_;
117 DISALLOW_COPY_AND_ASSIGN(UserDisplayManagerTest); 117 DISALLOW_COPY_AND_ASSIGN(UserDisplayManagerTest);
118 }; 118 };
119 119
120 TEST_F(UserDisplayManagerTest, OnlyNotifyWhenFrameDecorationsSet) { 120 TEST_F(UserDisplayManagerTest, OnlyNotifyWhenFrameDecorationsSet) {
121 platform_screen().AddDisplay(); 121 platform_screen().AddDisplay();
122 122
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 base::subtle::Atomic32 location = 229 base::subtle::Atomic32 location =
230 base::subtle::NoBarrier_Load(cursor_location_memory); 230 base::subtle::NoBarrier_Load(cursor_location_memory);
231 EXPECT_EQ(gfx::Point(static_cast<int16_t>(location >> 16), 231 EXPECT_EQ(gfx::Point(static_cast<int16_t>(location >> 16),
232 static_cast<int16_t>(location & 0xFFFF)), 232 static_cast<int16_t>(location & 0xFFFF)),
233 gfx::Point(-10, -11)); 233 gfx::Point(-10, -11));
234 } 234 }
235 235
236 } // namespace test 236 } // namespace test
237 } // namespace ws 237 } // namespace ws
238 } // namespace ui 238 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698