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..a1abb762348c1acfd39a4d1cd67a72d34c884e0e 100644 |
--- a/ash/wm/power_button_controller_unittest.cc |
+++ b/ash/wm/power_button_controller_unittest.cc |
@@ -83,30 +83,30 @@ TEST_F(PowerButtonControllerTest, LegacyLockAndShutDown) { |
// power button get pressed. |
controller_->OnPowerButtonEvent(true, base::TimeTicks::Now()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_SLOW_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
- EXPECT_FALSE(test_api_->hide_background_layer_timer_is_running()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
+ EXPECT_FALSE(test_api_->hide_black_layer_timer_is_running()); |
EXPECT_FALSE(test_api_->lock_timer_is_running()); |
EXPECT_EQ(1, delegate_->num_lock_requests()); |
// Notify that we locked successfully. |
controller_->OnStartingLock(); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_FAST_CLOSE)); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::SCREEN_LOCKER_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_HIDE)); |
// Notify that the lock window is visible. We should make it fade in. |
controller_->OnLockStateChanged(true); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllLockScreenContainersMask(), |
PowerButtonController::ANIMATION_FADE_IN)); |
// We shouldn't progress towards the shutdown state, however. |
@@ -117,9 +117,19 @@ 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 the all containers group was animated which |
+ // was in fact checking that |
+ // 1. All user session containers have transform (including wallpaper). |
+ // They're in this state after lock. |
+ // 2. Screen locker and related containers are in fact animating |
+ // (as shutdown is in progress). |
+ // With http://crbug.com/144737 we no longer animate user session wallpaper |
+ // during lock so it makes sense only to check that screen lock and related |
+ // containers are animated during shutdown. |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllLockScreenContainersMask(), |
PowerButtonController::ANIMATION_FAST_CLOSE)); |
EXPECT_FALSE(cursor_visible()); |
EXPECT_TRUE(test_api_->real_shutdown_timer_is_running()); |
@@ -153,32 +163,32 @@ TEST_F(PowerButtonControllerTest, ShutdownWhenNotLoggedIn) { |
controller_->set_has_legacy_power_button_for_test(false); |
controller_->OnLoginStateChanged(user::LOGGED_IN_NONE); |
controller_->OnLockStateChanged(false); |
- EXPECT_FALSE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_FALSE(test_api_->BlackLayerIsVisible()); |
// Press the power button and check that we start the shutdown timer. |
controller_->OnPowerButtonEvent(true, base::TimeTicks::Now()); |
EXPECT_FALSE(test_api_->lock_timer_is_running()); |
EXPECT_TRUE(test_api_->shutdown_timer_is_running()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllContainersMask(), |
PowerButtonController::ANIMATION_SLOW_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
// Release the power button before the shutdown timer fires. |
controller_->OnPowerButtonEvent(false, base::TimeTicks::Now()); |
EXPECT_FALSE(test_api_->shutdown_timer_is_running()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllContainersMask(), |
PowerButtonController::ANIMATION_UNDO_SLOW_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
- // We should re-hide the black background layer after waiting long enough for |
+ // We should re-hide the black black layer after waiting long enough for |
Daniel Erat
2012/09/04 17:42:23
nit: s/black black/black/
Nikita (slow)
2012/09/04 17:53:09
Done.
|
// the animation to finish. |
- EXPECT_TRUE(test_api_->hide_background_layer_timer_is_running()); |
- test_api_->trigger_hide_background_layer_timeout(); |
- EXPECT_FALSE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->hide_black_layer_timer_is_running()); |
+ test_api_->trigger_hide_black_layer_timeout(); |
+ EXPECT_FALSE(test_api_->BlackLayerIsVisible()); |
// Press the button again and make the shutdown timeout fire this time. |
// Check that we start the timer for actually requesting the shutdown. |
@@ -188,12 +198,12 @@ TEST_F(PowerButtonControllerTest, ShutdownWhenNotLoggedIn) { |
EXPECT_TRUE(test_api_->real_shutdown_timer_is_running()); |
EXPECT_EQ(0, delegate_->num_shutdown_requests()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_HIDE)); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllLockScreenContainersMask(), |
PowerButtonController::ANIMATION_FAST_CLOSE)); |
// When the timout fires, we should request a shutdown. |
@@ -206,14 +216,14 @@ TEST_F(PowerButtonControllerTest, LockAndUnlock) { |
controller_->set_has_legacy_power_button_for_test(false); |
controller_->OnLoginStateChanged(user::LOGGED_IN_USER); |
controller_->OnLockStateChanged(false); |
- EXPECT_FALSE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_FALSE(test_api_->BlackLayerIsVisible()); |
// We should initially be showing the screen locker containers, since they |
// also contain login-related windows that we want to show during the |
// logging-in animation. |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::SCREEN_LOCKER_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_RESTORE)); |
// Press the power button and check that the lock timer is started and that we |
@@ -222,22 +232,22 @@ TEST_F(PowerButtonControllerTest, LockAndUnlock) { |
EXPECT_TRUE(test_api_->lock_timer_is_running()); |
EXPECT_FALSE(test_api_->shutdown_timer_is_running()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_SLOW_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
// Release the button before the lock timer fires. |
controller_->OnPowerButtonEvent(false, base::TimeTicks::Now()); |
EXPECT_FALSE(test_api_->lock_timer_is_running()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_UNDO_SLOW_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
- EXPECT_TRUE(test_api_->hide_background_layer_timer_is_running()); |
- test_api_->trigger_hide_background_layer_timeout(); |
- EXPECT_FALSE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->hide_black_layer_timer_is_running()); |
+ test_api_->trigger_hide_black_layer_timeout(); |
+ EXPECT_FALSE(test_api_->BlackLayerIsVisible()); |
// Press the button and fire the lock timer. We should request that the |
// screen be locked, but we should still be in the slow-close animation. |
@@ -247,27 +257,27 @@ TEST_F(PowerButtonControllerTest, LockAndUnlock) { |
test_api_->trigger_lock_timeout(); |
EXPECT_EQ(1, delegate_->num_lock_requests()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_SLOW_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
// Notify that we locked successfully. |
controller_->OnStartingLock(); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_FAST_CLOSE)); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::SCREEN_LOCKER_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_HIDE)); |
// Notify that the lock window is visible. We should make it fade in. |
controller_->OnLockStateChanged(true); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllLockScreenContainersMask(), |
PowerButtonController::ANIMATION_FADE_IN)); |
// When we release the power button, the lock-to-shutdown timer should be |
@@ -277,13 +287,13 @@ TEST_F(PowerButtonControllerTest, LockAndUnlock) { |
EXPECT_FALSE(test_api_->lock_to_shutdown_timer_is_running()); |
// Notify that the screen has been unlocked. We should show the |
- // non-screen-locker windows and hide the background layer. |
+ // non-screen-locker windows and hide the black layer. |
controller_->OnLockStateChanged(false); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_RESTORE)); |
- EXPECT_FALSE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_FALSE(test_api_->BlackLayerIsVisible()); |
} |
// Hold the power button down from the unlocked state to eventual shutdown. |
@@ -298,7 +308,7 @@ TEST_F(PowerButtonControllerTest, LockToShutdown) { |
test_api_->trigger_lock_timeout(); |
controller_->OnStartingLock(); |
controller_->OnLockStateChanged(true); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
// When the lock-to-shutdown timeout fires, we should start the shutdown |
// timer. |
@@ -306,8 +316,8 @@ TEST_F(PowerButtonControllerTest, LockToShutdown) { |
test_api_->trigger_lock_to_shutdown_timeout(); |
EXPECT_TRUE(test_api_->shutdown_timer_is_running()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllContainersMask(), |
PowerButtonController::ANIMATION_SLOW_CLOSE)); |
// Fire the shutdown timeout and check that we request shutdown. |
@@ -316,7 +326,7 @@ TEST_F(PowerButtonControllerTest, LockToShutdown) { |
EXPECT_EQ(0, delegate_->num_shutdown_requests()); |
test_api_->trigger_real_shutdown_timeout(); |
EXPECT_EQ(1, delegate_->num_shutdown_requests()); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
} |
// Test that we handle the case where lock requests are ignored. |
@@ -332,10 +342,10 @@ TEST_F(PowerButtonControllerTest, LockFail) { |
controller_->OnPowerButtonEvent(true, base::TimeTicks::Now()); |
EXPECT_TRUE(test_api_->lock_timer_is_running()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_RESTORE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
test_api_->trigger_lock_timeout(); |
EXPECT_EQ(1, delegate_->num_lock_requests()); |
EXPECT_TRUE(test_api_->lock_fail_timer_is_running()); |
@@ -347,13 +357,13 @@ TEST_F(PowerButtonControllerTest, LockFail) { |
// Act as if the request timed out. We should restore the windows. |
test_api_->trigger_lock_fail_timeout(); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_RESTORE)); |
- EXPECT_FALSE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_FALSE(test_api_->BlackLayerIsVisible()); |
} |
-// Test that we start the timer to hide the background layer when the power |
+// Test that we start the timer to hide the black layer when the power |
// button is released, but that we cancel the timer if the button is pressed |
// again before the timer has fired. |
TEST_F(PowerButtonControllerTest, CancelHideBackground) { |
@@ -363,11 +373,11 @@ TEST_F(PowerButtonControllerTest, CancelHideBackground) { |
controller_->OnPowerButtonEvent(true, base::TimeTicks::Now()); |
controller_->OnPowerButtonEvent(false, base::TimeTicks::Now()); |
- EXPECT_TRUE(test_api_->hide_background_layer_timer_is_running()); |
+ EXPECT_TRUE(test_api_->hide_black_layer_timer_is_running()); |
// We should cancel the timer if we get another button-down event. |
controller_->OnPowerButtonEvent(true, base::TimeTicks::Now()); |
- EXPECT_FALSE(test_api_->hide_background_layer_timer_is_running()); |
+ EXPECT_FALSE(test_api_->hide_black_layer_timer_is_running()); |
} |
// Test the basic operation of the lock button. |
@@ -394,22 +404,22 @@ TEST_F(PowerButtonControllerTest, LockButtonBasic) { |
controller_->OnLockButtonEvent(true, base::TimeTicks::Now()); |
EXPECT_TRUE(test_api_->lock_timer_is_running()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_SLOW_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
// If the button is released immediately, we shouldn't lock the screen. |
controller_->OnLockButtonEvent(false, base::TimeTicks::Now()); |
EXPECT_FALSE(test_api_->lock_timer_is_running()); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_UNDO_SLOW_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
- EXPECT_TRUE(test_api_->hide_background_layer_timer_is_running()); |
- test_api_->trigger_hide_background_layer_timeout(); |
- EXPECT_FALSE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->hide_black_layer_timer_is_running()); |
+ test_api_->trigger_hide_black_layer_timeout(); |
+ EXPECT_FALSE(test_api_->BlackLayerIsVisible()); |
EXPECT_EQ(0, delegate_->num_lock_requests()); |
// Press the button again and let the lock timeout fire. We should request |
@@ -467,15 +477,15 @@ TEST_F(PowerButtonControllerTest, PowerButtonPreemptsLockButton) { |
// When the screen is locked without going through the usual power-button |
// slow-close path (e.g. via the wrench menu), test that we still show the |
-// fast-close animation and display the background layer. |
+// fast-close animation and display the black layer. |
TEST_F(PowerButtonControllerTest, LockWithoutButton) { |
controller_->OnLoginStateChanged(user::LOGGED_IN_USER); |
controller_->OnStartingLock(); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_FAST_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
} |
// When we hear that the process is exiting but we haven't had a chance to |
@@ -484,10 +494,10 @@ TEST_F(PowerButtonControllerTest, ShutdownWithoutButton) { |
controller_->OnLoginStateChanged(user::LOGGED_IN_USER); |
controller_->OnAppTerminating(); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllContainersMask(), |
PowerButtonController::ANIMATION_HIDE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
EXPECT_FALSE(cursor_visible()); |
} |
@@ -497,14 +507,14 @@ TEST_F(PowerButtonControllerTest, RequestShutdownFromLoginScreen) { |
controller_->OnLoginStateChanged(user::LOGGED_IN_NONE); |
controller_->RequestShutdown(); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_HIDE)); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllLockScreenContainersMask(), |
PowerButtonController::ANIMATION_FAST_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
EXPECT_FALSE(cursor_visible()); |
EXPECT_EQ(0, delegate_->num_shutdown_requests()); |
@@ -518,14 +528,14 @@ TEST_F(PowerButtonControllerTest, RequestShutdownFromLockScreen) { |
controller_->OnLockStateChanged(true); |
controller_->RequestShutdown(); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::ALL_BUT_SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::NON_LOCK_SCREEN_CONTAINERS, |
PowerButtonController::ANIMATION_HIDE)); |
EXPECT_TRUE( |
- test_api_->ContainerGroupIsAnimated( |
- PowerButtonController::SCREEN_LOCKER_AND_RELATED_CONTAINERS, |
+ test_api_->ContainersAreAnimated( |
+ PowerButtonController::GetAllLockScreenContainersMask(), |
PowerButtonController::ANIMATION_FAST_CLOSE)); |
- EXPECT_TRUE(test_api_->BackgroundLayerIsVisible()); |
+ EXPECT_TRUE(test_api_->BlackLayerIsVisible()); |
EXPECT_FALSE(cursor_visible()); |
EXPECT_EQ(0, delegate_->num_shutdown_requests()); |
@@ -534,16 +544,16 @@ TEST_F(PowerButtonControllerTest, RequestShutdownFromLockScreen) { |
EXPECT_EQ(1, delegate_->num_shutdown_requests()); |
} |
-// Test that the background layer is resized in response to root window resizes. |
-TEST_F(PowerButtonControllerTest, ResizeBackgroundLayer) { |
+// Test that the black layer is resized in response to root window resizes. |
+TEST_F(PowerButtonControllerTest, ResizeBlackLayer) { |
controller_->OnPowerButtonEvent(true, base::TimeTicks::Now()); |
EXPECT_EQ(Shell::GetPrimaryRootWindow()->bounds().ToString(), |
- test_api_->GetBackgroundLayerBounds().ToString()); |
+ test_api_->GetBlackLayerBounds().ToString()); |
const gfx::Size kNewSize(400, 300); |
Shell::GetPrimaryRootWindow()->SetHostSize(kNewSize); |
EXPECT_EQ(gfx::Rect(kNewSize).ToString(), |
- test_api_->GetBackgroundLayerBounds().ToString()); |
+ test_api_->GetBlackLayerBounds().ToString()); |
} |
// Test that we ignore power button presses when the screen is turned off. |