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

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 unit tests Created 7 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
« ash/root_window_controller.cc ('K') | « ash/root_window_controller.cc ('k') | no next file » | 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 0753600a1257a6d57a24758152354106a2265806..3818e3057a7cb7c1eeb5457c30703f1f96c525df 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -562,11 +562,32 @@ class VirtualKeyboardRootWindowControllerTest : public test::AshTestBase {
DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardRootWindowControllerTest);
};
+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];
oshima 2013/09/28 04:37:27 root_windows[ root_windows[0] == primary_root_wind
+
+ aura::Window* keyboard_container = Shell::GetContainer(primary_root_window,
+ internal::kShellWindowId_VirtualKeyboardContainer);
+ ASSERT_TRUE(keyboard_container);
oshima 2013/09/28 04:37:27 EXPECT_TRUE(Shell::GetContainer(...)) EXPECT_FALSE
+ keyboard_container = Shell::GetContainer(secondary_root_window,
+ internal::kShellWindowId_VirtualKeyboardContainer);
+ ASSERT_FALSE(keyboard_container);
+}
+
// 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);
« ash/root_window_controller.cc ('K') | « ash/root_window_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698