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

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

Issue 2549503002: Rename PlatformScreen to ScreenManager. (Closed)
Patch Set: Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/ws/window_tree.h" 5 #include "services/ui/ws/window_tree.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 1348
1349 using WindowTreeShutdownTest = testing::Test; 1349 using WindowTreeShutdownTest = testing::Test;
1350 1350
1351 // Makes sure WindowTreeClient doesn't get any messages during shutdown. 1351 // Makes sure WindowTreeClient doesn't get any messages during shutdown.
1352 TEST_F(WindowTreeShutdownTest, DontSendMessagesDuringShutdown) { 1352 TEST_F(WindowTreeShutdownTest, DontSendMessagesDuringShutdown) {
1353 std::unique_ptr<TestWindowTreeClient> client; 1353 std::unique_ptr<TestWindowTreeClient> client;
1354 { 1354 {
1355 // Create a tree with one window. 1355 // Create a tree with one window.
1356 WindowServerTestHelper ws_test_helper; 1356 WindowServerTestHelper ws_test_helper;
1357 WindowServer* window_server = ws_test_helper.window_server(); 1357 WindowServer* window_server = ws_test_helper.window_server();
1358 TestPlatformScreen platform_screen; 1358 TestScreenManager screen_manager;
msw 2016/12/01 20:01:19 optional nit: explicit include?
kylechar 2016/12/01 21:08:21 Ditto.
1359 platform_screen.Init(window_server->display_manager()); 1359 screen_manager.Init(window_server->display_manager());
1360 window_server->user_id_tracker()->AddUserId(kTestUserId1); 1360 window_server->user_id_tracker()->AddUserId(kTestUserId1);
1361 platform_screen.AddDisplay(); 1361 screen_manager.AddDisplay();
1362 1362
1363 AddWindowManager(window_server, kTestUserId1); 1363 AddWindowManager(window_server, kTestUserId1);
1364 window_server->user_id_tracker()->SetActiveUserId(kTestUserId1); 1364 window_server->user_id_tracker()->SetActiveUserId(kTestUserId1);
1365 TestWindowTreeBinding* test_binding = 1365 TestWindowTreeBinding* test_binding =
1366 ws_test_helper.window_server_delegate()->last_binding(); 1366 ws_test_helper.window_server_delegate()->last_binding();
1367 ASSERT_TRUE(test_binding); 1367 ASSERT_TRUE(test_binding);
1368 WindowTree* tree = test_binding->tree(); 1368 WindowTree* tree = test_binding->tree();
1369 const ClientWindowId window_id = BuildClientWindowId(tree, 2); 1369 const ClientWindowId window_id = BuildClientWindowId(tree, 2);
1370 ASSERT_TRUE(tree->NewWindow(window_id, ServerWindow::Properties())); 1370 ASSERT_TRUE(tree->NewWindow(window_id, ServerWindow::Properties()));
1371 1371
1372 // Release the client so that it survices shutdown. 1372 // Release the client so that it survices shutdown.
1373 client = test_binding->ReleaseClient(); 1373 client = test_binding->ReleaseClient();
1374 client->tracker()->changes()->clear(); 1374 client->tracker()->changes()->clear();
1375 } 1375 }
1376 1376
1377 // Client should not have got any messages after shutdown. 1377 // Client should not have got any messages after shutdown.
1378 EXPECT_TRUE(client->tracker()->changes()->empty()); 1378 EXPECT_TRUE(client->tracker()->changes()->empty());
1379 } 1379 }
1380 1380
1381 } // namespace test 1381 } // namespace test
1382 } // namespace ws 1382 } // namespace ws
1383 } // namespace ui 1383 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698