| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/system/overview/overview_button_tray.h" | 5 #include "ash/common/system/overview/overview_button_tray.h" |
| 6 | 6 |
| 7 #include "ash/common/login_status.h" | 7 #include "ash/common/login_status.h" |
| 8 #include "ash/common/system/status_area_widget.h" | 8 #include "ash/common/system/status_area_widget.h" |
| 9 #include "ash/common/test/test_session_state_delegate.h" | 9 #include "ash/common/test/test_session_state_delegate.h" |
| 10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 10 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 EXPECT_TRUE(WmShell::Get()->window_selector_controller()->IsSelecting()); | 205 EXPECT_TRUE(WmShell::Get()->window_selector_controller()->IsSelecting()); |
| 206 EXPECT_TRUE(GetTray()->is_active()); | 206 EXPECT_TRUE(GetTray()->is_active()); |
| 207 | 207 |
| 208 EXPECT_TRUE(WmShell::Get()->window_selector_controller()->ToggleOverview()); | 208 EXPECT_TRUE(WmShell::Get()->window_selector_controller()->ToggleOverview()); |
| 209 EXPECT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting()); | 209 EXPECT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting()); |
| 210 EXPECT_FALSE(GetTray()->is_active()); | 210 EXPECT_FALSE(GetTray()->is_active()); |
| 211 } | 211 } |
| 212 | 212 |
| 213 // Test that when a hide animation is aborted via deletion, that the | 213 // Test that when a hide animation is aborted via deletion, that the |
| 214 // OverviewButton is still hidden. | 214 // OverviewButton is still hidden. |
| 215 #if defined(OS_WIN) && !defined(USE_ASH) | 215 TEST_F(OverviewButtonTrayTest, HideAnimationAlwaysCompletes) { |
| 216 // TODO(msw): Broken on Windows. http://crbug.com/584038 | |
| 217 #define MAYBE_HideAnimationAlwaysCompletes DISABLED_HideAnimationAlwaysCompletes | |
| 218 #else | |
| 219 #define MAYBE_HideAnimationAlwaysCompletes HideAnimationAlwaysCompletes | |
| 220 #endif | |
| 221 TEST_F(OverviewButtonTrayTest, MAYBE_HideAnimationAlwaysCompletes) { | |
| 222 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( | 216 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( |
| 223 true); | 217 true); |
| 224 | 218 |
| 225 // Long duration for hide animation, to allow it to be interrupted. | 219 // Long duration for hide animation, to allow it to be interrupted. |
| 226 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> hide_duration( | 220 std::unique_ptr<ui::ScopedAnimationDurationScaleMode> hide_duration( |
| 227 new ui::ScopedAnimationDurationScaleMode( | 221 new ui::ScopedAnimationDurationScaleMode( |
| 228 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION)); | 222 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION)); |
| 229 GetTray()->SetVisible(false); | 223 GetTray()->SetVisible(false); |
| 230 | 224 |
| 231 // ScreenRotationAnimator copies the current layers, and deletes them upon | 225 // ScreenRotationAnimator copies the current layers, and deletes them upon |
| (...skipping 25 matching lines...) Expand all Loading... |
| 257 ASSERT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); | 251 ASSERT_TRUE(WmShell::Get()->IsSystemModalWindowOpen()); |
| 258 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( | 252 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( |
| 259 true); | 253 true); |
| 260 EXPECT_TRUE(GetTray()->visible()); | 254 EXPECT_TRUE(GetTray()->visible()); |
| 261 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( | 255 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( |
| 262 false); | 256 false); |
| 263 EXPECT_FALSE(GetTray()->visible()); | 257 EXPECT_FALSE(GetTray()->visible()); |
| 264 } | 258 } |
| 265 | 259 |
| 266 } // namespace ash | 260 } // namespace ash |
| OLD | NEW |