Index: ash/virtual_keyboard_controller_unittest.cc |
diff --git a/ash/virtual_keyboard_controller_unittest.cc b/ash/virtual_keyboard_controller_unittest.cc |
index f3d169b3a9c24f2dc51a89eaf27d0021a84dad6b..cba157f56c3b4df592f5180310f7e76f94274e1b 100644 |
--- a/ash/virtual_keyboard_controller_unittest.cc |
+++ b/ash/virtual_keyboard_controller_unittest.cc |
@@ -235,6 +235,29 @@ TEST_F(VirtualKeyboardControllerAutoTest, HandleMultipleKeyboardsPresent) { |
ASSERT_FALSE(keyboard::IsKeyboardEnabled()); |
} |
+// Tests maximized mode interaction without disabling the internal keyboard. |
pkotwicz
2015/03/02 20:35:57
A test that the virtual keyboard is surpressed if
rsadam
2015/03/02 22:01:37
Done.
|
+TEST_F(VirtualKeyboardControllerAutoTest, EnabledDuringMaximizeMode) { |
+ std::vector<ui::TouchscreenDevice> screens; |
+ screens.push_back(ui::TouchscreenDevice( |
+ 1, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, gfx::Size(1024, 768), 0)); |
+ UpdateTouchscreenDevices(screens); |
+ std::vector<ui::KeyboardDevice> keyboards; |
+ keyboards.push_back( |
+ ui::KeyboardDevice(1, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); |
+ UpdateKeyboardDevices(keyboards); |
+ ASSERT_FALSE(keyboard::IsKeyboardEnabled()); |
+ // Toggle maximized mode on. |
+ Shell::GetInstance() |
+ ->maximize_mode_controller() |
+ ->EnableMaximizeModeWindowManager(true); |
+ ASSERT_TRUE(keyboard::IsKeyboardEnabled()); |
+ // Toggle maximized mode off. |
+ Shell::GetInstance() |
+ ->maximize_mode_controller() |
+ ->EnableMaximizeModeWindowManager(false); |
+ ASSERT_FALSE(keyboard::IsKeyboardEnabled()); |
+} |
+ |
class VirtualKeyboardControllerAlwaysEnabledTest |
: public VirtualKeyboardControllerAutoTest { |
public: |