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

Unified Diff: ash/accelerators/accelerator_commands_unittest.cc

Issue 181563004: Remove --ash-disable-overview-mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 6 years, 9 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/accelerators/accelerator_commands.cc ('k') | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_commands_unittest.cc
diff --git a/ash/accelerators/accelerator_commands_unittest.cc b/ash/accelerators/accelerator_commands_unittest.cc
index 82f75346b31d22ff4e7d5c668489a85d01e456eb..3bc1ece05e2cda21a41dfe2de038deee205c6861 100644
--- a/ash/accelerators/accelerator_commands_unittest.cc
+++ b/ash/accelerators/accelerator_commands_unittest.cc
@@ -20,18 +20,31 @@ namespace accelerators {
typedef test::AshTestBase AcceleratorCommandsTest;
TEST_F(AcceleratorCommandsTest, ToggleMinimized) {
- scoped_ptr<aura::Window> window(
+ scoped_ptr<aura::Window> window1(
CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
- wm::WindowState* window_state = wm::GetWindowState(window.get());
- window_state->Activate();
+ scoped_ptr<aura::Window> window2(
+ CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
+ wm::WindowState* window_state1 = wm::GetWindowState(window1.get());
+ wm::WindowState* window_state2 = wm::GetWindowState(window2.get());
+ window_state1->Activate();
+ window_state2->Activate();
+
+ ToggleMinimized();
+ EXPECT_TRUE(window_state2->IsMinimized());
+ EXPECT_FALSE(window_state2->IsNormalStateType());
+ EXPECT_TRUE(window_state1->IsActive());
ToggleMinimized();
- EXPECT_TRUE(window_state->IsMinimized());
- EXPECT_FALSE(window_state->IsNormalStateType());
+ EXPECT_TRUE(window_state1->IsMinimized());
+ EXPECT_FALSE(window_state1->IsNormalStateType());
+ EXPECT_FALSE(window_state1->IsActive());
+ // Toggling minimize when there are no active windows should unminimize and
+ // activate the last active window.
ToggleMinimized();
- EXPECT_FALSE(window_state->IsMinimized());
- EXPECT_TRUE(window_state->IsNormalStateType());
+ EXPECT_FALSE(window_state1->IsMinimized());
+ EXPECT_TRUE(window_state1->IsNormalStateType());
+ EXPECT_TRUE(window_state1->IsActive());
}
} // namespace accelerators
« no previous file with comments | « ash/accelerators/accelerator_commands.cc ('k') | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698