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

Unified Diff: ash/root_window_controller_unittest.cc

Issue 25111002: Only show virtual keyboard on primary root window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a TODO Created 7 years, 2 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/shell.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 cfab428947b132288d78ef7ca11c24597e1f449e..70d9146c8b1e5451f6cfc5466c852d32327e7fb7 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -626,11 +626,34 @@ class VirtualKeyboardRootWindowControllerTest : public test::AshTestBase {
DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardRootWindowControllerTest);
};
+// Test for http://crbug.com/297858. Virtual keyboard container should only show
+// on primary root window.
+TEST_F(VirtualKeyboardRootWindowControllerTest,
+ VirtualKeyboardOnPrimaryRootWindowOnly) {
+ if (!SupportsMultipleDisplays())
+ return;
+
+ UpdateDisplay("500x500,500x500");
+
+ Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
+ aura::RootWindow* primary_root_window = Shell::GetPrimaryRootWindow();
+ aura::RootWindow* secondary_root_window =
+ root_windows[0] == primary_root_window ?
+ root_windows[1] : root_windows[0];
+
+ ASSERT_TRUE(Shell::GetContainer(
+ primary_root_window,
+ internal::kShellWindowId_VirtualKeyboardContainer));
+ ASSERT_FALSE(Shell::GetContainer(
+ secondary_root_window,
+ internal::kShellWindowId_VirtualKeyboardContainer));
+}
+
// Test for http://crbug.com/263599. Virtual keyboard should be able to receive
// events at blocked user session.
TEST_F(VirtualKeyboardRootWindowControllerTest,
ClickVirtualKeyboardInBlockedWindow) {
- aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow();
+ aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
aura::Window* keyboard_container = Shell::GetContainer(root_window,
internal::kShellWindowId_VirtualKeyboardContainer);
ASSERT_TRUE(keyboard_container);
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698