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

Unified Diff: ash/wm/compact_layout_manager_unittest.cc

Issue 9388018: Compact layout mananger animates windows rather than the default container layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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
Index: ash/wm/compact_layout_manager_unittest.cc
diff --git a/ash/wm/compact_layout_manager_unittest.cc b/ash/wm/compact_layout_manager_unittest.cc
index f2768c9ee6b335ebeb585d61ad10ccabff8ad2f6..a2e624b38d4a94aca70ef0d4448df98ae29e7ff1 100644
--- a/ash/wm/compact_layout_manager_unittest.cc
+++ b/ash/wm/compact_layout_manager_unittest.cc
@@ -127,26 +127,25 @@ TEST_F(CompactLayoutManagerTest, StatusAreaVisibility) {
TEST_F(CompactLayoutManagerTest, TransitionTest) {
// Assert on viewport size to be the host size.
ASSERT_EQ(kMaxWidth, default_container_layer_width());
- // Create 3 windows, check that the layer grow as each one is added
+ // Create 3 windows, check that the layer doesn't grow as each one is added
// to the layout.
aura::Window* window1 = CreateNormalWindow(0);
EXPECT_EQ(kMaxWidth, default_container_layer_width());
aura::Window* window2 = CreateNormalWindow(1);
- EXPECT_EQ(kMaxWidth * 2, default_container_layer_width());
+ EXPECT_EQ(kMaxWidth, default_container_layer_width());
aura::Window* window3 = CreateNormalWindow(2);
- EXPECT_EQ(kMaxWidth * 3, default_container_layer_width());
+ EXPECT_EQ(kMaxWidth, default_container_layer_width());
animation_element()->Step(base::TimeTicks::Now() +
base::TimeDelta::FromSeconds(1));
RunAllPendingInMessageLoop();
// Check laid out position of the windows.
- EXPECT_EQ(0, window1->bounds().x());
- EXPECT_EQ(kMaxWidth, window2->bounds().x());
- EXPECT_EQ(kMaxWidth * 2, window3->bounds().x());
+ EXPECT_EQ(-kMaxWidth * 2, window1->bounds().x());
+ EXPECT_EQ(-kMaxWidth, window2->bounds().x());
+ EXPECT_EQ(0, window3->bounds().x());
// Check layer transformation.
ui::Transform target_transform;
- target_transform.ConcatTranslate(-window3->bounds().x(), 0);
EXPECT_EQ(target_transform, default_container_layer_transform());
RunAllPendingInMessageLoop();
@@ -161,9 +160,11 @@ TEST_F(CompactLayoutManagerTest, TransitionTest) {
window3->Hide();
animation_element()->Step(base::TimeTicks::Now() +
base::TimeDelta::FromSeconds(1));
- ui::Transform target_transform1;
- target_transform1.ConcatTranslate(-window1->bounds().x(), 0);
- EXPECT_EQ(target_transform1, default_container_layer_transform());
+
+ // Check laid out position of the windows.
+ EXPECT_EQ(0, window1->bounds().x());
+ EXPECT_EQ(kMaxWidth, window2->bounds().x());
+
EXPECT_TRUE(window1->IsVisible());
EXPECT_FALSE(window2->IsVisible());
EXPECT_FALSE(window3->IsVisible());

Powered by Google App Engine
This is Rietveld 408576698