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

Unified Diff: ash/wm/system_modal_container_layout_manager_unittest.cc

Issue 2374613004: Use WmLayoutManager::OnChildWindowVisibilityChanged to update the system modal state. (Closed)
Patch Set: Observe WmLayoutManager::OnChildWindowVisibilityChanged to update the systemo modal state. Created 4 years, 3 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 | « ash/common/wm/system_modal_container_layout_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_modal_container_layout_manager_unittest.cc
diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc
index 9ba6dfac4d0118adbf62a2486161abe1e1f2a2e2..dc95fbdea4abf8c834b0b448bec58f1487410ba6 100644
--- a/ash/wm/system_modal_container_layout_manager_unittest.cc
+++ b/ash/wm/system_modal_container_layout_manager_unittest.cc
@@ -784,6 +784,16 @@ TEST_F(SystemModalContainerLayoutManagerTest, VisibilityChange) {
EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen());
EXPECT_TRUE(layout_manager->has_window_dimmer());
+ // Make sure that a child visibility change should not cause
+ // inconsistent state.
+ std::unique_ptr<aura::Window> child = base::MakeUnique<aura::Window>(nullptr);
+ child->SetType(ui::wm::WINDOW_TYPE_CONTROL);
+ child->Init(ui::LAYER_TEXTURED);
+ modal_window->AddChild(child.get());
+ child->Show();
+ EXPECT_TRUE(WmShell::Get()->IsSystemModalWindowOpen());
+ EXPECT_TRUE(layout_manager->has_window_dimmer());
+
modal_window->Hide();
EXPECT_FALSE(WmShell::Get()->IsSystemModalWindowOpen());
EXPECT_FALSE(layout_manager->has_window_dimmer());
« no previous file with comments | « ash/common/wm/system_modal_container_layout_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698