Chromium Code Reviews| Index: ash/display/virtual_keyboard_window_controller_unittest.cc |
| diff --git a/ash/display/virtual_keyboard_window_controller_unittest.cc b/ash/display/virtual_keyboard_window_controller_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2da1021e6aef91ada7f1d0f85705755273fb3064 |
| --- /dev/null |
| +++ b/ash/display/virtual_keyboard_window_controller_unittest.cc |
| @@ -0,0 +1,55 @@ |
| +#include "ash/display/virtual_keyboard_window_controller.h" |
| + |
| +#include "ash/ash_switches.h" |
| +#include "ash/display/display_controller.h" |
| +#include "ash/root_window_controller.h" |
| +#include "ash/shell.h" |
| +#include "ash/shell_window_ids.h" |
| +#include "ash/test/ash_test_base.h" |
| +#include "base/command_line.h" |
| +#include "ui/keyboard/keyboard_switches.h" |
| + |
| +namespace ash { |
| +namespace { |
| + |
| +class VirtualKeyboardWindowControllerTest : public test::AshTestBase { |
| + public: |
| + VirtualKeyboardWindowControllerTest() {} |
| + virtual ~VirtualKeyboardWindowControllerTest() {} |
| + |
| + virtual void SetUp() OVERRIDE { |
| + CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| + switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300"); |
| + CommandLine::ForCurrentProcess()->AppendSwitch( |
| + keyboard::switches::kKeyboardUsabilityTest); |
| + test::AshTestBase::SetUp(); |
| + } |
| + |
| + virtual void TearDown() OVERRIDE { |
| + test::AshTestBase::TearDown(); |
| + } |
|
oshima
2013/11/01 00:09:02
TearDown is not necessary.
bshe
2013/11/12 15:28:33
Done.
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowControllerTest); |
| +}; |
| + |
| +} // namespace |
| + |
| +#if defined(OS_WIN) |
| +// Virtual keyboard window does not work on win. |
| +#define MAYBE_VirtualKeyboardWindowTest DISABLED_VirtualKeyboardWindowTest |
|
oshima
2013/11/01 00:09:02
can you check if this works on win7 aura? (you can
bshe
2013/11/12 15:28:33
On 2013/11/01 00:09:02, oshima wrote:
> can you ch
|
| +#else |
| +#define MAYBE_VirtualKeyboardWindowTest VirtualKeyboardWindowTest |
| +#endif |
| +TEST_F(VirtualKeyboardWindowControllerTest, MAYBE_VirtualKeyboardWindowTest) { |
| + RunAllPendingInMessageLoop(); |
| + internal::RootWindowController* root_window_controller = |
| + Shell::GetInstance()->display_controller()-> |
| + virtual_keyboard_window_controller()->root_window_controller(); |
| + EXPECT_TRUE(root_window_controller); |
| + // Keyboard container is added to virtual keyboard window. |
| + EXPECT_TRUE(root_window_controller->GetContainer( |
| + internal::kShellWindowId_VirtualKeyboardContainer)); |
| +} |
| + |
| +} // namespace ash |