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

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

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Wrap comment 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 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 TestPlatformScreen platform_screen;
1359 platform_screen.Init(window_server->display_manager()); 1359 platform_screen.Init(window_server->display_manager(),
1360 display::PlatformScreen::WINDOW_MODE_INTERNAL);
1360 window_server->user_id_tracker()->AddUserId(kTestUserId1); 1361 window_server->user_id_tracker()->AddUserId(kTestUserId1);
1361 platform_screen.AddDisplay(); 1362 platform_screen.AddDisplay();
1362 1363
1363 AddWindowManager(window_server, kTestUserId1); 1364 AddWindowManager(window_server, kTestUserId1);
1364 window_server->user_id_tracker()->SetActiveUserId(kTestUserId1); 1365 window_server->user_id_tracker()->SetActiveUserId(kTestUserId1);
1365 TestWindowTreeBinding* test_binding = 1366 TestWindowTreeBinding* test_binding =
1366 ws_test_helper.window_server_delegate()->last_binding(); 1367 ws_test_helper.window_server_delegate()->last_binding();
1367 ASSERT_TRUE(test_binding); 1368 ASSERT_TRUE(test_binding);
1368 WindowTree* tree = test_binding->tree(); 1369 WindowTree* tree = test_binding->tree();
1369 const ClientWindowId window_id = BuildClientWindowId(tree, 2); 1370 const ClientWindowId window_id = BuildClientWindowId(tree, 2);
1370 ASSERT_TRUE(tree->NewWindow(window_id, ServerWindow::Properties())); 1371 ASSERT_TRUE(tree->NewWindow(window_id, ServerWindow::Properties()));
1371 1372
1372 // Release the client so that it survices shutdown. 1373 // Release the client so that it survices shutdown.
1373 client = test_binding->ReleaseClient(); 1374 client = test_binding->ReleaseClient();
1374 client->tracker()->changes()->clear(); 1375 client->tracker()->changes()->clear();
1375 } 1376 }
1376 1377
1377 // Client should not have got any messages after shutdown. 1378 // Client should not have got any messages after shutdown.
1378 EXPECT_TRUE(client->tracker()->changes()->empty()); 1379 EXPECT_TRUE(client->tracker()->changes()->empty());
1379 } 1380 }
1380 1381
1381 } // namespace test 1382 } // namespace test
1382 } // namespace ws 1383 } // namespace ws
1383 } // namespace ui 1384 } // namespace ui
OLDNEW
« services/ui/display/platform_screen_ozone.cc ('K') | « services/ui/ws/window_server_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698