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

Unified Diff: ash/accelerators/accelerator_commands_unittest.cc

Issue 2078883003: Handle UNPIN operation in ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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 dfc164886652797c5f302e41484f3292a425a89a..eb25279c8f91659838359965cd786b0126c77617 100644
--- a/ash/accelerators/accelerator_commands_unittest.cc
+++ b/ash/accelerators/accelerator_commands_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/common/wm/window_state.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_state_aura.h"
+#include "ash/wm/window_util.h"
#include "ui/aura/window.h"
// Note: The unit tests for |ToggleMaximized()| and
@@ -50,5 +51,18 @@ TEST_F(AcceleratorCommandsTest, ToggleMinimized) {
EXPECT_TRUE(window_state1->IsActive());
}
+TEST_F(AcceleratorCommandsTest, Unpin) {
+ std::unique_ptr<aura::Window> window1(
+ CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
+ wm::WindowState* window_state1 = wm::GetWindowState(window1.get());
+ window_state1->Activate();
+
+ wm::PinWindow(window1.get());
+ EXPECT_TRUE(window_state1->IsPinned());
+
+ Unpin();
+ EXPECT_FALSE(window_state1->IsPinned());
+}
+
} // namespace accelerators
} // namespace ash
« 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