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

Unified Diff: ash/wm/system_modal_container_layout_manager_unittest.cc

Issue 240443006: Remove native VK window height logic and wait for resizeTo to setup VK window height (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 8 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/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc ('k') | ui/keyboard/keyboard_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/system_modal_container_layout_manager_unittest.cc
diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc
index 55f0d8c62376aa361df3170df383b895fe5d0675..c81838c174f174594f6d19a388a2b82962af802e 100644
--- a/ash/wm/system_modal_container_layout_manager_unittest.cc
+++ b/ash/wm/system_modal_container_layout_manager_unittest.cc
@@ -149,8 +149,8 @@ class SystemModalContainerLayoutManagerTest : public AshTestBase {
public:
virtual void SetUp() OVERRIDE {
// Allow a virtual keyboard (and initialize it per default).
- CommandLine::ForCurrentProcess()->AppendSwitch(
- keyboard::switches::kEnableVirtualKeyboard);
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ keyboard::switches::kEnableVirtualKeyboard);
AshTestBase::SetUp();
Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
keyboard::KeyboardController::GetInstance());
@@ -188,10 +188,19 @@ class SystemModalContainerLayoutManagerTest : public AshTestBase {
// animation and wait until its finished.
ui::ScopedAnimationDurationScaleMode normal_duration_mode(
ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
pkotwicz 2014/04/23 15:18:42 [Optional Nit]: You may be able to remove the need
bshe 2014/04/23 16:07:12 Done.
- if (show)
- keyboard->ShowAndLockKeyboard();
- else
+ if (show) {
+ keyboard->ShowKeyboard(true);
+ if (keyboard->proxy()->GetKeyboardWindow()->bounds().height() == 0) {
+ gfx::Rect window_bounds = keyboard->GetContainerWindow()->bounds();
+ keyboard->proxy()->GetKeyboardWindow()->SetBounds(gfx::Rect(
+ window_bounds.x(),
+ window_bounds.y() + window_bounds.height() - 100,
pkotwicz 2014/04/23 15:18:42 Nit: You can use window_bounds.bottom() here
bshe 2014/04/23 16:07:12 Done.
+ window_bounds.width(),
+ 100));
+ }
+ } else {
keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL);
+ }
WaitForWindowAnimationToBeFinished(keyboard->GetContainerWindow());
« no previous file with comments | « ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc ('k') | ui/keyboard/keyboard_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698