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

Unified Diff: ash/test/ash_test_base.cc

Issue 2852403002: Make virtual keyboard work on supervised user creation (Closed)
Patch Set: nit. Restore DCHECK and updated comment. Created 3 years, 6 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/shell_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/shell_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698