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

Unified Diff: ui/keyboard/keyboard_controller_unittest.cc

Issue 1508303003: Show floating VK on first tap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | ui/keyboard/keyboard_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller_unittest.cc
diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc
index a999b2078d25801c46d24948ae5d1d8838ff2837..3fc550cc968df7d33a985a24d4f93eb77efee151 100644
--- a/ui/keyboard/keyboard_controller_unittest.cc
+++ b/ui/keyboard/keyboard_controller_unittest.cc
@@ -612,4 +612,22 @@ TEST_F(KeyboardControllerAnimationTest, ContainerShowWhileHide) {
EXPECT_EQ(gfx::Transform(), layer->transform());
}
+// Test for crbug.com/568274.
+TEST_F(KeyboardControllerTest, FloatingKeyboardShowOnFirstTap) {
+ aura::Window* container(controller()->GetContainerWindow());
+ aura::Window* keyboard(ui()->GetKeyboardWindow());
+ root_window()->AddChild(container);
+ controller()->SetKeyboardMode(FLOATING);
+ container->AddChild(keyboard);
+ // Mock focus on an input field.
+ ui()->GetInputMethod()->ShowImeIfNeeded();
+ // Mock set keyboard size from javascript side. In floating mode, virtual
+ // keyboard's size is decided by client.
+ gfx::Rect new_bounds(0, 50, 50, 50);
+ keyboard->SetBounds(new_bounds);
+ ASSERT_EQ(new_bounds, container->bounds());
+ EXPECT_TRUE(keyboard->IsVisible());
+ EXPECT_TRUE(container->IsVisible());
+}
+
} // namespace keyboard
« no previous file with comments | « no previous file | ui/keyboard/keyboard_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698