| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/system_modal_container_layout_manager.h" | 5 #include "ash/wm/system_modal_container_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 DISALLOW_COPY_AND_ASSIGN(TransientWindowObserver); | 137 DISALLOW_COPY_AND_ASSIGN(TransientWindowObserver); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 } // namespace | 140 } // namespace |
| 141 | 141 |
| 142 class SystemModalContainerLayoutManagerTest : public AshTestBase { | 142 class SystemModalContainerLayoutManagerTest : public AshTestBase { |
| 143 public: | 143 public: |
| 144 void SetUp() override { | 144 void SetUp() override { |
| 145 // Allow a virtual keyboard (and initialize it per default). | 145 // Allow a virtual keyboard (and initialize it per default). |
| 146 CommandLine::ForCurrentProcess()->AppendSwitch( | 146 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 147 keyboard::switches::kEnableVirtualKeyboard); | 147 keyboard::switches::kEnableVirtualKeyboard); |
| 148 AshTestBase::SetUp(); | 148 AshTestBase::SetUp(); |
| 149 Shell::GetPrimaryRootWindowController()->ActivateKeyboard( | 149 Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
| 150 keyboard::KeyboardController::GetInstance()); | 150 keyboard::KeyboardController::GetInstance()); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void TearDown() override { | 153 void TearDown() override { |
| 154 Shell::GetPrimaryRootWindowController()->DeactivateKeyboard( | 154 Shell::GetPrimaryRootWindowController()->DeactivateKeyboard( |
| 155 keyboard::KeyboardController::GetInstance()); | 155 keyboard::KeyboardController::GetInstance()); |
| 156 AshTestBase::TearDown(); | 156 AshTestBase::TearDown(); |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 ShowKeyboard(true); | 644 ShowKeyboard(true); |
| 645 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); | 645 EXPECT_EQ(modal_size.ToString(), modal_window->bounds().size().ToString()); |
| 646 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); | 646 EXPECT_EQ(modal_origin.x(), modal_window->bounds().x()); |
| 647 EXPECT_EQ(0, modal_window->bounds().y()); | 647 EXPECT_EQ(0, modal_window->bounds().y()); |
| 648 | 648 |
| 649 ShowKeyboard(false); | 649 ShowKeyboard(false); |
| 650 } | 650 } |
| 651 | 651 |
| 652 } // namespace test | 652 } // namespace test |
| 653 } // namespace ash | 653 } // namespace ash |
| OLD | NEW |