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

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: Disable display rotation test on Windows. 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
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/virtual_keyboard_container_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..339be89e4d83a90ba961bce267eca1d3d7368866 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -944,5 +944,27 @@ TEST_F(VirtualKeyboardRootWindowControllerTest, ZOrderTest) {
menu.reset();
}
+// Resolution in UpdateDisplay is not being respected on Windows 8.
+#if defined(OS_WIN)
+#define MAYBE_DisplayRotation DISABLED_DisplayRotation
+#else
+#define MAYBE_DisplayRotation DisplayRotation
+#endif
+
+// Tests that the virtual keyboard correctly resizes with a change to display
+// orientation. See crbug/417612.
+TEST_F(VirtualKeyboardRootWindowControllerTest, MAYBE_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();
+ EXPECT_EQ("0,0 800x600", keyboard_container->bounds().ToString());
+
+ UpdateDisplay("600x800");
+ EXPECT_EQ("0,0 600x800", keyboard_container->bounds().ToString());
+}
+
} // namespace test
} // namespace ash
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/virtual_keyboard_container_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698