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

Side by Side Diff: services/ui/ws/display_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/display_manager_delegate.h ('k') | services/ui/ws/test_utils.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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 class DisplayTest : public testing::Test { 56 class DisplayTest : public testing::Test {
57 public: 57 public:
58 DisplayTest() : cursor_id_(0), platform_display_factory_(&cursor_id_) {} 58 DisplayTest() : cursor_id_(0), platform_display_factory_(&cursor_id_) {}
59 ~DisplayTest() override {} 59 ~DisplayTest() override {}
60 60
61 protected: 61 protected:
62 // testing::Test: 62 // testing::Test:
63 void SetUp() override { 63 void SetUp() override {
64 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); 64 PlatformDisplay::set_factory_for_testing(&platform_display_factory_);
65 window_server_.reset(new WindowServer(&window_server_delegate_, 65 window_server_.reset(new WindowServer(&window_server_delegate_));
66 scoped_refptr<SurfacesState>()));
67 window_server_delegate_.set_window_server(window_server_.get()); 66 window_server_delegate_.set_window_server(window_server_.get());
68 window_server_->user_id_tracker()->AddUserId(kTestId1); 67 window_server_->user_id_tracker()->AddUserId(kTestId1);
69 window_server_->user_id_tracker()->AddUserId(kTestId2); 68 window_server_->user_id_tracker()->AddUserId(kTestId2);
70 } 69 }
71 70
72 protected: 71 protected:
73 int32_t cursor_id_; 72 int32_t cursor_id_;
74 TestPlatformDisplayFactory platform_display_factory_; 73 TestPlatformDisplayFactory platform_display_factory_;
75 TestWindowServerDelegate window_server_delegate_; 74 TestWindowServerDelegate window_server_delegate_;
76 std::unique_ptr<WindowServer> window_server_; 75 std::unique_ptr<WindowServer> window_server_;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 Display* display2 = tree->GetDisplay(root2); 298 Display* display2 = tree->GetDisplay(root2);
300 WindowManagerState* display2_wms = 299 WindowManagerState* display2_wms =
301 display2->GetWindowManagerDisplayRootForUser(kTestId1) 300 display2->GetWindowManagerDisplayRootForUser(kTestId1)
302 ->window_manager_state(); 301 ->window_manager_state();
303 EXPECT_EQ(display1_wms->window_tree(), display2_wms->window_tree()); 302 EXPECT_EQ(display1_wms->window_tree(), display2_wms->window_tree());
304 } 303 }
305 304
306 } // namespace test 305 } // namespace test
307 } // namespace ws 306 } // namespace ws
308 } // namespace ui 307 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display_manager_delegate.h ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698