Commit e506d0be authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

[VK] Fix DisableOverscrollForImeWindow to use overscrolling.

VirtualKeyboardAppWindowTest.DisableOverscrollForImeWindow tests that
we don't reduce the viewport size of IME related windows (like the
floating candidate window when you gesture type). However, the test
uses ShowKeyboard(true), which shows the locked keyboard. When the
locked keyboard appears, we don't overscroll. Rather, we reduce the
size of the work area, shrinking the actual size of the window. The
test still passes because shrinking the work area also shrinks the
viewport size.

This patch changes the test to use ShowKeyboard(false), which triggers
overscrolling. This matches the original intent of the test more
closely.

TBR=yhanada@chromium.org

Bug: 849995
Change-Id: Ifdbea75c5b84081fc67cd29e3af21f1984b4a4eb
Reviewed-on: https://chromium-review.googlesource.com/1160064Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580461}
parent 9fee87fc
...@@ -226,7 +226,7 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardAppWindowTest, ...@@ -226,7 +226,7 @@ IN_PROC_BROWSER_TEST_F(VirtualKeyboardAppWindowTest,
int screen_height = ash::Shell::GetPrimaryRootWindow()->bounds().height(); int screen_height = ash::Shell::GetPrimaryRootWindow()->bounds().height();
gfx::Rect test_bounds(0, 0, 0, screen_height - ime_window_visible_height + 1); gfx::Rect test_bounds(0, 0, 0, screen_height - ime_window_visible_height + 1);
auto* controller = keyboard::KeyboardController::Get(); auto* controller = keyboard::KeyboardController::Get();
controller->ShowKeyboard(true); controller->ShowKeyboard(false /* locked */);
controller->NotifyKeyboardWindowLoaded(); controller->NotifyKeyboardWindowLoaded();
controller->GetKeyboardWindow()->SetBounds(test_bounds); controller->GetKeyboardWindow()->SetBounds(test_bounds);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment