| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/accelerators/accelerator_commands.h" | 5 #include "ash/common/accelerators/accelerator_commands.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "ash/accelerators/accelerator_commands_aura.h" | 9 #include "ash/accelerators/accelerator_commands_aura.h" |
| 10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 EXPECT_TRUE(window_state1->IsNormalStateType()); | 51 EXPECT_TRUE(window_state1->IsNormalStateType()); |
| 52 EXPECT_TRUE(window_state1->IsActive()); | 52 EXPECT_TRUE(window_state1->IsActive()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 TEST_F(AcceleratorCommandsTest, Unpin) { | 55 TEST_F(AcceleratorCommandsTest, Unpin) { |
| 56 std::unique_ptr<aura::Window> window1( | 56 std::unique_ptr<aura::Window> window1( |
| 57 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); | 57 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); |
| 58 wm::WindowState* window_state1 = wm::GetWindowState(window1.get()); | 58 wm::WindowState* window_state1 = wm::GetWindowState(window1.get()); |
| 59 window_state1->Activate(); | 59 window_state1->Activate(); |
| 60 | 60 |
| 61 wm::PinWindow(window1.get()); | 61 wm::PinWindow(window1.get(), /* trusted */ false); |
| 62 EXPECT_TRUE(window_state1->IsPinned()); | 62 EXPECT_TRUE(window_state1->IsPinned()); |
| 63 | 63 |
| 64 Unpin(); | 64 Unpin(); |
| 65 EXPECT_FALSE(window_state1->IsPinned()); | 65 EXPECT_FALSE(window_state1->IsPinned()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace accelerators | 68 } // namespace accelerators |
| 69 } // namespace ash | 69 } // namespace ash |
| OLD | NEW |