Chromium Code Reviews| 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..d36ac05fc1bd903000f48313ae330f5711b18c14 100644 |
| --- a/ash/system/overview/overview_button_tray_unittest.cc |
| +++ b/ash/system/overview/overview_button_tray_unittest.cc |
| @@ -19,6 +19,7 @@ |
| #include "ash/wm/overview/window_selector_controller.h" |
| #include "base/command_line.h" |
| #include "base/time/time.h" |
| +#include "ui/aura/client/aura_constants.h" |
|
jonross
2015/05/01 17:30:15
Necessary?
tdanderson
2015/05/01 18:07:31
This was part of a quick hack and I meant to remov
|
| #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| #include "ui/events/event.h" |
| #include "ui/events/event_constants.h" |
| @@ -147,6 +148,21 @@ 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. |
| +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); |
|
jonross
2015/05/01 17:30:15
Check afterwards to make sure visibility toggling
tdanderson
2015/05/01 18:07:31
Done.
|
| +} |
| + |
| // 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) { |