| 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/display/virtual_keyboard_window_controller.h" | 5 #include "ash/display/virtual_keyboard_window_controller.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
| 12 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
| 13 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 14 #include "ui/keyboard/keyboard_switches.h" | 15 #include "ui/keyboard/keyboard_switches.h" |
| 15 #include "ui/keyboard/keyboard_util.h" | 16 #include "ui/keyboard/keyboard_util.h" |
| 16 | 17 |
| 17 namespace ash { | 18 namespace ash { |
| 18 namespace test { | 19 namespace test { |
| 19 | 20 |
| 20 class VirtualKeyboardWindowControllerTest : public AshTestBase { | 21 class VirtualKeyboardWindowControllerTest : public AshTestBase { |
| 21 public: | 22 public: |
| 22 VirtualKeyboardWindowControllerTest() | 23 VirtualKeyboardWindowControllerTest() |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 78 } |
| 78 | 79 |
| 79 // Tests that the onscreen keyboard becomes enabled when maximize mode is | 80 // Tests that the onscreen keyboard becomes enabled when maximize mode is |
| 80 // enabled. | 81 // enabled. |
| 81 TEST_F(VirtualKeyboardWindowControllerTest, EnabledDuringMaximizeMode) { | 82 TEST_F(VirtualKeyboardWindowControllerTest, EnabledDuringMaximizeMode) { |
| 82 set_virtual_keyboard_window_controller( | 83 set_virtual_keyboard_window_controller( |
| 83 Shell::GetInstance()->display_controller()-> | 84 Shell::GetInstance()->display_controller()-> |
| 84 virtual_keyboard_window_controller()); | 85 virtual_keyboard_window_controller()); |
| 85 | 86 |
| 86 ASSERT_FALSE(keyboard::IsKeyboardEnabled()); | 87 ASSERT_FALSE(keyboard::IsKeyboardEnabled()); |
| 87 Shell::GetInstance()->EnableMaximizeModeWindowManager(true); | 88 Shell::GetInstance()->maximize_mode_controller()-> |
| 89 EnableMaximizeModeWindowManager(true); |
| 88 EXPECT_TRUE(keyboard::IsKeyboardEnabled()); | 90 EXPECT_TRUE(keyboard::IsKeyboardEnabled()); |
| 89 Shell::GetInstance()->EnableMaximizeModeWindowManager(false); | 91 Shell::GetInstance()->maximize_mode_controller()-> |
| 92 EnableMaximizeModeWindowManager(false); |
| 90 EXPECT_FALSE(keyboard::IsKeyboardEnabled()); | 93 EXPECT_FALSE(keyboard::IsKeyboardEnabled()); |
| 91 } | 94 } |
| 92 | 95 |
| 93 } // namespace test | 96 } // namespace test |
| 94 } // namespace ash | 97 } // namespace ash |
| OLD | NEW |