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

Unified Diff: ash/wm/power_button_controller_unittest.cc

Issue 10909008: Improve existing lock transition - remove black splash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 8 years, 4 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
« ash/wm/power_button_controller.h ('K') | « ash/wm/power_button_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/power_button_controller_unittest.cc
diff --git a/ash/wm/power_button_controller_unittest.cc b/ash/wm/power_button_controller_unittest.cc
index b84a0717c6ddd56a4854332de9f6a2291b03334b..a1b867af1588e269f25baf22fc296795728ad93e 100644
--- a/ash/wm/power_button_controller_unittest.cc
+++ b/ash/wm/power_button_controller_unittest.cc
@@ -99,7 +99,7 @@ TEST_F(PowerButtonControllerTest, LegacyLockAndShutDown) {
PowerButtonController::ANIMATION_FAST_CLOSE));
EXPECT_TRUE(
test_api_->ContainerGroupIsAnimated(
- PowerButtonController::SCREEN_LOCKER_CONTAINERS,
+ PowerButtonController::SCREEN_LOCKER_CONTAINERS_EXCEPT_WALLPAPER,
PowerButtonController::ANIMATION_HIDE));
// Notify that the lock window is visible. We should make it fade in.
@@ -117,9 +117,18 @@ TEST_F(PowerButtonControllerTest, LegacyLockAndShutDown) {
// Hold the button again and check that we start shutting down.
controller_->OnPowerButtonEvent(true, base::TimeTicks::Now());
EXPECT_EQ(0, delegate_->num_shutdown_requests());
+ // Previously we're checking that ALL_CONTAINERS are animated which was in
+ // fact checking that
+ // 1. ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS have transform
+ // (including wallpaper). They're in this state after lock.
+ // 2. SCREEN_LOCKER_AND_RELATED_CONTAINERS are in fact animating
+ // (shutdown is in progress).
+ // With http://crbug.com/144737 we no longer animate wallpaper during lock
+ // so it makes sense only to check that SCREEN_LOCKER_AND_RELATED_CONTAINERS
+ // are animated during shutdown.
EXPECT_TRUE(
test_api_->ContainerGroupIsAnimated(
- PowerButtonController::ALL_CONTAINERS,
+ PowerButtonController::SCREEN_LOCKER_AND_RELATED_CONTAINERS,
PowerButtonController::ANIMATION_FAST_CLOSE));
EXPECT_FALSE(cursor_visible());
EXPECT_TRUE(test_api_->real_shutdown_timer_is_running());
@@ -213,7 +222,7 @@ TEST_F(PowerButtonControllerTest, LockAndUnlock) {
// logging-in animation.
EXPECT_TRUE(
test_api_->ContainerGroupIsAnimated(
- PowerButtonController::SCREEN_LOCKER_CONTAINERS,
+ PowerButtonController::SCREEN_LOCKER_CONTAINERS_EXCEPT_WALLPAPER,
PowerButtonController::ANIMATION_RESTORE));
// Press the power button and check that the lock timer is started and that we
@@ -260,7 +269,7 @@ TEST_F(PowerButtonControllerTest, LockAndUnlock) {
PowerButtonController::ANIMATION_FAST_CLOSE));
EXPECT_TRUE(
test_api_->ContainerGroupIsAnimated(
- PowerButtonController::SCREEN_LOCKER_CONTAINERS,
+ PowerButtonController::SCREEN_LOCKER_CONTAINERS_EXCEPT_WALLPAPER,
PowerButtonController::ANIMATION_HIDE));
// Notify that the lock window is visible. We should make it fade in.
« ash/wm/power_button_controller.h ('K') | « ash/wm/power_button_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698