| Index: ash/system/chromeos/power/tablet_power_button_controller_unittest.cc
|
| diff --git a/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc b/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc
|
| index 3f06a501e28d74f6e0b6cb5b3f11c513e3ed9c0a..4415359e3a0c06b73d7e20bf3d5e06de7c68047f 100644
|
| --- a/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc
|
| +++ b/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc
|
| @@ -7,7 +7,8 @@
|
| #include <memory>
|
|
|
| #include "ash/common/ash_switches.h"
|
| -#include "ash/common/session/session_state_delegate.h"
|
| +#include "ash/common/session/session_controller.h"
|
| +#include "ash/common/test/test_session_controller_client.h"
|
| #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
|
| #include "ash/common/wm_shell.h"
|
| #include "ash/shell.h"
|
| @@ -93,7 +94,7 @@ class TabletPowerButtonControllerTest : public AshTestBase {
|
|
|
| void UnlockScreen() {
|
| lock_state_controller_->OnLockStateChanged(false);
|
| - WmShell::Get()->GetSessionStateDelegate()->UnlockScreen();
|
| + GetSessionControllerClient()->UnlockScreen();
|
| }
|
|
|
| void Initialize(LoginStatus status) {
|
| @@ -108,7 +109,12 @@ class TabletPowerButtonControllerTest : public AshTestBase {
|
| }
|
|
|
| bool GetLockedState() {
|
| - return WmShell::Get()->GetSessionStateDelegate()->IsScreenLocked();
|
| + // LockScreen is an async mojo call. Spin message loop to ensure it is
|
| + // delivered.
|
| + SessionController* const session_controller =
|
| + WmShell::Get()->session_controller();
|
| + session_controller->FlushMojoForTest();
|
| + return session_controller->IsScreenLocked();
|
| }
|
|
|
| bool GetBacklightsForcedOff() WARN_UNUSED_RESULT {
|
|
|