Chromium Code Reviews| 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()); |