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

Unified Diff: ash/system/overview/overview_button_tray_unittest.cc

Issue 1114383002: Show overview mode button in TouchView with open modal window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use SetBoundsInScreen() Created 5 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 | « ash/system/overview/overview_button_tray.cc ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a7e6a3e17fe4ba9c87a6e654e576fc0b7ae8eff2..244fad29646b4eaa14e6578eeb25e241ef7a4cf2 100644
--- a/ash/system/overview/overview_button_tray_unittest.cc
+++ b/ash/system/overview/overview_button_tray_unittest.cc
@@ -182,6 +182,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) {
« no previous file with comments | « ash/system/overview/overview_button_tray.cc ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698