Chromium Code Reviews| Index: ash/test/ash_test_base.cc |
| diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc |
| index 1de82986a3aba0df5d9f74e83dd8e73b565b685e..56249a8218c210f7192cbdc3f530e53d513e16c3 100644 |
| --- a/ash/test/ash_test_base.cc |
| +++ b/ash/test/ash_test_base.cc |
| @@ -48,6 +48,7 @@ |
| #include "ui/display/types/display_constants.h" |
| #include "ui/events/gesture_detection/gesture_configuration.h" |
| #include "ui/gfx/geometry/point.h" |
| +#include "ui/keyboard/keyboard_controller.h" |
| #include "ui/wm/core/coordinate_conversion.h" |
| #if defined(USE_X11) |
| @@ -169,6 +170,14 @@ void AshTestBase::SetUp() { |
| ash_test_helper_->SetUp(start_session_); |
| + // The following function should be invoked from |
| + // ChromeBrowserMainExtraPartsAsh::PostProfileInit |
| + // on real Chrome OS. Without this, |
| + // LockActionHandlerLayoutManagerTest.KeyboardBounds fails on |
| + // ShowKeyboard(true). |
| + ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
| + keyboard::KeyboardController::GetInstance()); |
|
xiyuan
2017/06/07 15:08:13
If only that test fails without this, should this
oka
2017/06/07 15:45:19
ash_test_helper_->SetUp() initializes the keyboard
xiyuan
2017/06/07 16:18:13
But Shell::CreateKeyboard calls ActivateKeyboard t
|
| + |
| Shell::GetPrimaryRootWindow()->Show(); |
| Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
| // Move the mouse cursor to far away so that native events doesn't |