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

Unified Diff: ash/system/chromeos/power/power_event_observer_unittest.cc

Issue 2446453002: Refactor ShouldLockScreenBeforeSuspending to ShouldLockScreenAutomatically (Closed)
Patch Set: comment Created 4 years, 2 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/power/power_event_observer.cc ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/power/power_event_observer_unittest.cc
diff --git a/ash/system/chromeos/power/power_event_observer_unittest.cc b/ash/system/chromeos/power/power_event_observer_unittest.cc
index 949a44806b50b4fa8ae3af8d88eca7fbac0285e6..5d0b79f7a279d3e6a44a3da242772eb36c64a08c 100644
--- a/ash/system/chromeos/power/power_event_observer_unittest.cc
+++ b/ash/system/chromeos/power/power_event_observer_unittest.cc
@@ -59,7 +59,7 @@ TEST_F(PowerEventObserverTest, LockBeforeSuspend) {
// Check that the observer requests a suspend-readiness callback when it hears
// that the system is about to suspend.
test::TestSessionStateDelegate::SetCanLockScreen(true);
- SetShouldLockScreenBeforeSuspending(true);
+ SetShouldLockScreenAutomatically(true);
observer_->SuspendImminent();
EXPECT_EQ(1, client->GetNumPendingSuspendReadinessCallbacks());
@@ -80,7 +80,7 @@ TEST_F(PowerEventObserverTest, LockBeforeSuspend) {
// It also shouldn't request a callback if it isn't instructed to lock the
// screen.
observer_->SuspendDone(base::TimeDelta());
- SetShouldLockScreenBeforeSuspending(false);
+ SetShouldLockScreenAutomatically(false);
observer_->SuspendImminent();
EXPECT_EQ(0, client->GetNumPendingSuspendReadinessCallbacks());
}
@@ -97,7 +97,7 @@ TEST_F(PowerEventObserverTest, SetInvisibleBeforeSuspend) {
// Tests that all the Compositors are marked invisible _after_ the screen lock
// animations have completed.
test::TestSessionStateDelegate::SetCanLockScreen(true);
- SetShouldLockScreenBeforeSuspending(true);
+ SetShouldLockScreenAutomatically(true);
observer_->SuspendImminent();
EXPECT_EQ(1, GetNumVisibleCompositors());
@@ -116,7 +116,7 @@ TEST_F(PowerEventObserverTest, CanceledSuspend) {
// Tests that the Compositors are not marked invisible if a suspend is
// canceled or the system resumes before the lock screen is ready.
test::TestSessionStateDelegate::SetCanLockScreen(true);
- SetShouldLockScreenBeforeSuspending(true);
+ SetShouldLockScreenAutomatically(true);
observer_->SuspendImminent();
EXPECT_EQ(1, GetNumVisibleCompositors());
@@ -138,7 +138,7 @@ TEST_F(PowerEventObserverTest, DelayResuspendForLockAnimations) {
// In this case, the observer should block the second suspend request until
// the animations have completed.
test::TestSessionStateDelegate::SetCanLockScreen(true);
- SetShouldLockScreenBeforeSuspending(true);
+ SetShouldLockScreenAutomatically(true);
chromeos::PowerManagerClient* client =
chromeos::DBusThreadManager::Get()->GetPowerManagerClient();
« no previous file with comments | « ash/system/chromeos/power/power_event_observer.cc ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698