OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/workspace_controller.h" | 5 #include "ash/wm/workspace_controller.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 | 1196 |
1197 // |window1| should be flush right and |window2| flush left. | 1197 // |window1| should be flush right and |window2| flush left. |
1198 EXPECT_EQ(base::IntToString( | 1198 EXPECT_EQ(base::IntToString( |
1199 desktop_area.width() - window1->bounds().width()) + | 1199 desktop_area.width() - window1->bounds().width()) + |
1200 ",32 640x320", window1->bounds().ToString()); | 1200 ",32 640x320", window1->bounds().ToString()); |
1201 EXPECT_EQ("0,40 256x512", window2->bounds().ToString()); | 1201 EXPECT_EQ("0,40 256x512", window2->bounds().ToString()); |
1202 } | 1202 } |
1203 | 1203 |
1204 // Test that animations are triggered. | 1204 // Test that animations are triggered. |
1205 TEST_F(WorkspaceControllerTest, AnimatedNormToMaxToNormRepositionsRemaining) { | 1205 TEST_F(WorkspaceControllerTest, AnimatedNormToMaxToNormRepositionsRemaining) { |
1206 ui::ScopedAnimationDurationScaleMode normal_duration_mode( | 1206 ui::ScopedAnimationDurationScaleMode test_duration_mode( |
1207 ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION); | 1207 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION); |
1208 scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0)); | 1208 scoped_ptr<aura::Window> window1(CreateTestWindowInShellWithId(0)); |
1209 window1->Hide(); | 1209 window1->Hide(); |
1210 window1->SetBounds(gfx::Rect(16, 32, 640, 320)); | 1210 window1->SetBounds(gfx::Rect(16, 32, 640, 320)); |
1211 gfx::Rect desktop_area = window1->parent()->bounds(); | 1211 gfx::Rect desktop_area = window1->parent()->bounds(); |
1212 scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1)); | 1212 scoped_ptr<aura::Window> window2(CreateTestWindowInShellWithId(1)); |
1213 window2->Hide(); | 1213 window2->Hide(); |
1214 window2->SetBounds(gfx::Rect(32, 48, 256, 512)); | 1214 window2->SetBounds(gfx::Rect(32, 48, 256, 512)); |
1215 | 1215 |
1216 wm::GetWindowState(window1.get())->set_window_position_managed(true); | 1216 wm::GetWindowState(window1.get())->set_window_position_managed(true); |
1217 wm::GetWindowState(window2.get())->set_window_position_managed(true); | 1217 wm::GetWindowState(window2.get())->set_window_position_managed(true); |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1609 ui::EventTimeForNow()); | 1609 ui::EventTimeForNow()); |
1610 target = targeter->FindTargetForEvent(root, &touch); | 1610 target = targeter->FindTargetForEvent(root, &touch); |
1611 if (points[i].is_target_hit) | 1611 if (points[i].is_target_hit) |
1612 EXPECT_EQ(window.get(), target); | 1612 EXPECT_EQ(window.get(), target); |
1613 else | 1613 else |
1614 EXPECT_NE(window.get(), target); | 1614 EXPECT_NE(window.get(), target); |
1615 } | 1615 } |
1616 } | 1616 } |
1617 | 1617 |
1618 } // namespace ash | 1618 } // namespace ash |
OLD | NEW |