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

Side by Side Diff: ui/aura/mus/window_tree_client_unittest.cc

Issue 2500973002: Converts test_wm to use aura (Closed)
Patch Set: delete cant be used 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/aura/mus/window_tree_client.h" 5 #include "ui/aura/mus/window_tree_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 ASSERT_FALSE(window_tree()->has_change()); 1220 ASSERT_FALSE(window_tree()->has_change());
1221 ASSERT_EQ(1u, root_window()->children().size()); 1221 ASSERT_EQ(1u, root_window()->children().size());
1222 Window* server_window = root_window()->children()[0]; 1222 Window* server_window = root_window()->children()[0];
1223 EXPECT_EQ(window1->parent(), server_window); 1223 EXPECT_EQ(window1->parent(), server_window);
1224 EXPECT_EQ(window2->parent(), server_window); 1224 EXPECT_EQ(window2->parent(), server_window);
1225 ASSERT_EQ(2u, server_window->children().size()); 1225 ASSERT_EQ(2u, server_window->children().size());
1226 EXPECT_EQ(window1, server_window->children()[0]); 1226 EXPECT_EQ(window1, server_window->children()[0]);
1227 EXPECT_EQ(window2, server_window->children()[1]); 1227 EXPECT_EQ(window2, server_window->children()[1]);
1228 } 1228 }
1229 1229
1230 // Ensures when WindowTreeClient::OnWindowDeleted() is called nothing is
1231 // scheduled on the server side.
1232 TEST_F(WindowTreeClientClientTest, OnWindowDeletedDoesntNotifyServer) {
1233 Window window1(nullptr);
1234 window1.Init(ui::LAYER_NOT_DRAWN);
1235 Window* window2 = new Window(nullptr);
1236 window2->Init(ui::LAYER_NOT_DRAWN);
1237 window1.AddChild(window2);
1238 window_tree()->AckAllChanges();
1239 window_tree_client()->OnWindowDeleted(server_id(window2));
1240 EXPECT_FALSE(window_tree()->has_change());
1241 }
1242
1230 } // namespace aura 1243 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698