Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: ash/root_window_controller_unittest.cc

Issue 617553002: Fix size and position of the virtual keyboard after a screen rotation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698