Index: ash/system/overview/overview_button_tray_unittest.cc |
diff --git a/ash/system/overview/overview_button_tray_unittest.cc b/ash/system/overview/overview_button_tray_unittest.cc |
index 3268b7b068989749befcef57f2a9f94a77738e2b..0465a4f2cadffa5dc8db556c085de084609c75ed 100644 |
--- a/ash/system/overview/overview_button_tray_unittest.cc |
+++ b/ash/system/overview/overview_button_tray_unittest.cc |
@@ -147,6 +147,23 @@ TEST_F(OverviewButtonTrayTest, VisibilityChangesForLoginStatus) { |
EnableMaximizeModeWindowManager(false); |
} |
+// Tests that the overview button becomes visible when the user enters |
+// maximize mode with a system modal window open, and that it hides once |
+// the user exits maximize mode. |
+TEST_F(OverviewButtonTrayTest, VisibilityChangesForSystemModalWindow) { |
+ scoped_ptr<aura::Window> window( |
+ CreateTestModalWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); |
+ ASSERT_TRUE(Shell::GetInstance()->IsSystemModalWindowOpen()); |
+ Shell::GetInstance() |
+ ->maximize_mode_controller() |
+ ->EnableMaximizeModeWindowManager(true); |
+ EXPECT_TRUE(GetTray()->visible()); |
+ Shell::GetInstance() |
+ ->maximize_mode_controller() |
+ ->EnableMaximizeModeWindowManager(false); |
+ EXPECT_FALSE(GetTray()->visible()); |
+} |
+ |
// Tests that the tray only renders as active while selection is ongoing. Any |
// dismissal of overview mode clears the active state. |
TEST_F(OverviewButtonTrayTest, ActiveStateOnlyDuringOverviewMode) { |