Chromium Code Reviews| Index: ash/root_window_controller_unittest.cc |
| diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc |
| index 3be8a011a927cb7fc88574fe444bcd7745f3ce06..089e646d015fa3c8819887ab91151cc5ccb4b6f8 100644 |
| --- a/ash/root_window_controller_unittest.cc |
| +++ b/ash/root_window_controller_unittest.cc |
| @@ -944,5 +944,20 @@ TEST_F(VirtualKeyboardRootWindowControllerTest, ZOrderTest) { |
| menu.reset(); |
| } |
| +// Tests that the virtual keyboard correctly resizes with a change to display |
| +// orientation. See crbug/417612. |
| +TEST_F(VirtualKeyboardRootWindowControllerTest, DisplayRotation) { |
| + UpdateDisplay("800x600"); |
| + aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
| + aura::Window* keyboard_container = |
| + Shell::GetContainer(root_window, kShellWindowId_VirtualKeyboardContainer); |
| + ASSERT_TRUE(keyboard_container); |
| + keyboard_container->Show(); |
| + ASSERT_EQ("0,0 800x600", keyboard_container->bounds().ToString()); |
|
James Cook
2014/09/29 21:38:00
nit: EXPECT_EQ since the test can proceed even if
|
| + |
| + UpdateDisplay("600x800"); |
| + ASSERT_EQ("0,0 600x800", keyboard_container->bounds().ToString()); |
| +} |
|
James Cook
2014/09/29 21:38:00
nice easy-to-read test
|
| + |
| } // namespace test |
| } // namespace ash |