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 virtual void TearDown() OVERRIDE { | |
29 test::AshTestBase::TearDown(); | |
30 } | |
oshima
2013/11/01 00:09:02
TearDown is not necessary.
bshe
2013/11/12 15:28:33
Done.
| |
31 | |
32 private: | |
33 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardWindowControllerTest); | |
34 }; | |
35 | |
36 } // namespace | |
37 | |
38 #if defined(OS_WIN) | |
39 // Virtual keyboard window does not work on win. | |
40 #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
| |
41 #else | |
42 #define MAYBE_VirtualKeyboardWindowTest VirtualKeyboardWindowTest | |
43 #endif | |
44 TEST_F(VirtualKeyboardWindowControllerTest, MAYBE_VirtualKeyboardWindowTest) { | |
45 RunAllPendingInMessageLoop(); | |
46 internal::RootWindowController* root_window_controller = | |
47 Shell::GetInstance()->display_controller()-> | |
48 virtual_keyboard_window_controller()->root_window_controller(); | |
49 EXPECT_TRUE(root_window_controller); | |
50 // Keyboard container is added to virtual keyboard window. | |
51 EXPECT_TRUE(root_window_controller->GetContainer( | |
52 internal::kShellWindowId_VirtualKeyboardContainer)); | |
53 } | |
54 | |
55 } // namespace ash | |
OLD | NEW |