OLD | NEW |
(Empty) | |
| 1 #include "ash/display/virtual_keyboard_window_controller.h" |
| 2 |
| 3 #include "ash/ash_switches.h" |
| 4 #include "ash/display/display_controller.h" |
| 5 #include "ash/root_window_controller.h" |
| 6 #include "ash/shell.h" |
| 7 #include "ash/shell_window_ids.h" |
| 8 #include "ash/test/ash_test_base.h" |
| 9 #include "base/command_line.h" |
| 10 #include "ui/keyboard/keyboard_switches.h" |
| 11 |
| 12 namespace ash { |
| 13 namespace { |
| 14 |
| 15 class VirtualKeyboardWindowControllerTest : public test::AshTestBase { |
| 16 public: |
| 17 VirtualKeyboardWindowControllerTest() {} |
| 18 virtual ~VirtualKeyboardWindowControllerTest() {} |
| 19 |
| 20 virtual void SetUp() OVERRIDE { |
| 21 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 22 switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300"); |
| 23 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 24 keyboard::switches::kKeyboardUsabilityTest); |
| 25 test::AshTestBase::SetUp(); |
| 26 } |
| 27 |
| 28 private: |
| 29 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowControllerTest); |
| 30 }; |
| 31 |
| 32 } // namespace |
| 33 |
| 34 TEST_F(VirtualKeyboardWindowControllerTest, VirtualKeyboardWindowTest) { |
| 35 if (!SupportsMultipleDisplays()) |
| 36 return; |
| 37 RunAllPendingInMessageLoop(); |
| 38 internal::RootWindowController* root_window_controller = |
| 39 Shell::GetInstance()->display_controller()-> |
| 40 virtual_keyboard_window_controller()->root_window_controller(); |
| 41 EXPECT_TRUE(root_window_controller); |
| 42 // Keyboard container is added to virtual keyboard window. |
| 43 EXPECT_TRUE(root_window_controller->GetContainer( |
| 44 internal::kShellWindowId_VirtualKeyboardContainer)); |
| 45 } |
| 46 |
| 47 } // namespace ash |
OLD | NEW |