| 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 ba6316c7a7de49e2adcc4b2827dc1b34004121be..81a583068ed20428f71b7850b02f8e5f8a7f4899 100644
|
| --- a/ash/wm/power_button_controller_unittest.cc
|
| +++ b/ash/wm/power_button_controller_unittest.cc
|
| @@ -9,6 +9,8 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/time.h"
|
| #include "ui/aura/root_window.h"
|
| +#include "ui/gfx/rect.h"
|
| +#include "ui/gfx/size.h"
|
|
|
| namespace ash {
|
| namespace test {
|
| @@ -525,5 +527,17 @@ 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) {
|
| + controller_->OnPowerButtonEvent(true, base::TimeTicks::Now());
|
| + EXPECT_EQ(Shell::GetRootWindow()->bounds().ToString(),
|
| + test_api_->GetBackgroundLayerBounds().ToString());
|
| +
|
| + const gfx::Size kNewSize(400, 300);
|
| + Shell::GetRootWindow()->SetHostSize(kNewSize);
|
| + EXPECT_EQ(gfx::Rect(kNewSize).ToString(),
|
| + test_api_->GetBackgroundLayerBounds().ToString());
|
| +}
|
| +
|
| } // namespace test
|
| } // namespace ash
|
|
|