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

Unified Diff: ui/aura/mus/window_tree_client_unittest.cc

Issue 2509753007: Fixes bug in handling window deletion originating from server (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client_unittest.cc
diff --git a/ui/aura/mus/window_tree_client_unittest.cc b/ui/aura/mus/window_tree_client_unittest.cc
index e6ed1c1fdf90d79d8c7eaa2e9cd32e0ed678624a..e11c8a9de1e3725b977c26f22394e52c18f6cdfa 100644
--- a/ui/aura/mus/window_tree_client_unittest.cc
+++ b/ui/aura/mus/window_tree_client_unittest.cc
@@ -1227,4 +1227,17 @@ TEST_F(WindowTreeClientWmTest, OnWindowHierarchyChangedWithExistingWindow) {
EXPECT_EQ(window2, server_window->children()[1]);
}
+// Ensures when WindowTreeClient::OnWindowDeleted() is called nothing is
+// scheduled on the server side.
+TEST_F(WindowTreeClientClientTest, OnWindowDeletedDoesntNotifyServer) {
+ Window window1(nullptr);
+ window1.Init(ui::LAYER_NOT_DRAWN);
+ Window* window2 = new Window(nullptr);
+ window2->Init(ui::LAYER_NOT_DRAWN);
+ window1.AddChild(window2);
+ window_tree()->AckAllChanges();
+ window_tree_client()->OnWindowDeleted(server_id(window2));
+ EXPECT_FALSE(window_tree()->has_change());
+}
+
} // namespace aura
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698