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

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

Issue 2897663002: chromeos: makes it possible for windows to outlive WindowTreeClient (Closed)
Patch Set: cleanup Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/test/aura_test_base.h » ('j') | 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 2f8b467f1f09c6b9a237080ed6fb75126312294e..be5bae444d14ecb1ca2115d8626bdb0250cc7e09 100644
--- a/ui/aura/mus/window_tree_client_unittest.cc
+++ b/ui/aura/mus/window_tree_client_unittest.cc
@@ -2405,4 +2405,18 @@ TEST_F(WindowTreeClientClientTestHighDPI, InputEventsInDip) {
window_delegate1.last_event_location());
}
+using WindowTreeClientDestructionTest = test::AuraTestBaseMus;
+
+TEST_F(WindowTreeClientDestructionTest, Shutdown) {
+ // Windows should be able to outlive the WindowTreeClient.
+ aura::Window window(nullptr);
+ window.Init(ui::LAYER_NOT_DRAWN);
+ DeleteWindowTreeClient();
+
+ // And it should be possible to create Windows after the WindowTreeClient has
+ // been deleted.
+ aura::Window window2(nullptr);
+ window2.Init(ui::LAYER_NOT_DRAWN);
+}
+
} // namespace aura
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/test/aura_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698