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

Unified Diff: athena/wm/window_manager_unittest.cc

Issue 464163005: athena: Fix switching to a window of a different size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | « athena/wm/window_manager_impl.cc ('k') | athena/wm/window_overview_mode.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_manager_unittest.cc
diff --git a/athena/wm/window_manager_unittest.cc b/athena/wm/window_manager_unittest.cc
index 41d949c628ecdf7b947b74f6df7cb7476420565a..b4cddf3b81b9acd7cdcb7fc16ab48b85d2945238 100644
--- a/athena/wm/window_manager_unittest.cc
+++ b/athena/wm/window_manager_unittest.cc
@@ -179,6 +179,8 @@ TEST_F(WindowManagerTest, TitleDragSwitchBetweenWindows) {
EXPECT_TRUE(wm::IsActiveWindow(second.get()));
EXPECT_EQ(second.get(),
wm_api.window_list_provider()->GetWindowList().back());
+ EXPECT_TRUE(second->IsVisible());
+ EXPECT_FALSE(third->IsVisible());
// Performing the same gesture again will switch back to |third|.
generator.GestureScrollSequence(gfx::Point(20, 10),
@@ -187,6 +189,18 @@ TEST_F(WindowManagerTest, TitleDragSwitchBetweenWindows) {
5);
EXPECT_TRUE(wm::IsActiveWindow(third.get()));
EXPECT_EQ(third.get(), wm_api.window_list_provider()->GetWindowList().back());
+ EXPECT_FALSE(second->IsVisible());
+ EXPECT_TRUE(third->IsVisible());
+
+ // Perform a swipe that doesn't go enough to perform the window switch.
+ generator.GestureScrollSequence(gfx::Point(20, 10),
+ gfx::Point(20, 90),
+ base::TimeDelta::FromMilliseconds(20),
+ 5);
+ EXPECT_TRUE(wm::IsActiveWindow(third.get()));
+ EXPECT_EQ(third.get(), wm_api.window_list_provider()->GetWindowList().back());
+ EXPECT_FALSE(second->IsVisible());
+ EXPECT_TRUE(third->IsVisible());
}
TEST_F(WindowManagerTest, TitleDragSwitchBetweenWindowsInSplitViewMode) {
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | athena/wm/window_overview_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698