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

Unified Diff: ash/wm/power_button_controller_unittest.cc

Issue 10263015: ash: Resize PowerButtonController background layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 8 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/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 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
« no previous file with comments | « ash/wm/power_button_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698