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

Unified Diff: ash/accelerators/accelerator_commands_unittest.cc

Issue 23611005: ash: Allow web pages to use the Ctrl-M minimize shortcut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
Index: ash/accelerators/accelerator_commands_unittest.cc
diff --git a/ash/accelerators/accelerator_commands_unittest.cc b/ash/accelerators/accelerator_commands_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7d75cb89aee3b8ba6d11fa3d6b213387f529429e
--- /dev/null
+++ b/ash/accelerators/accelerator_commands_unittest.cc
@@ -0,0 +1,31 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/accelerators/accelerator_commands.h"
+
+#include "ash/test/ash_test_base.h"
+#include "ash/wm/window_util.h"
+#include "ui/aura/window.h"
+
+namespace ash {
+namespace accelerators {
+
+typedef test::AshTestBase AcceleratorCommandsTest;
+
+TEST_F(AcceleratorCommandsTest, ToggleMinimized) {
+ scoped_ptr<aura::Window> window(
+ CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
+ wm::ActivateWindow(window.get());
+
+ ToggleMinimized();
+ EXPECT_TRUE(wm::IsWindowMinimized(window.get()));
+ EXPECT_FALSE(wm::IsWindowNormal(window.get()));
+
+ ToggleMinimized();
+ EXPECT_FALSE(wm::IsWindowMinimized(window.get()));
+ EXPECT_TRUE(wm::IsWindowNormal(window.get()));
+}
+
+} // namespace accelerators
+} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698