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

Unified Diff: athena/wm/window_manager_unittest.cc

Issue 495193003: athena: Fix overview mode for split-view mode. (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.h » ('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 8a331cafc46cebed205de9c90b423484d18cadd5..54f22a52afbf5e056ea7e58e75cd952731250586 100644
--- a/athena/wm/window_manager_unittest.cc
+++ b/athena/wm/window_manager_unittest.cc
@@ -315,4 +315,24 @@ TEST_F(WindowManagerTest, SplitModeActivationByShortcut) {
EXPECT_EQ(width, w2->bounds().width());
}
+TEST_F(WindowManagerTest, OverviewModeFromSplitMode) {
+ test::WindowManagerImplTestApi wm_api;
+
+ aura::test::TestWindowDelegate delegate;
+ scoped_ptr<aura::Window> w1(CreateTestWindow(&delegate, gfx::Rect()));
+ scoped_ptr<aura::Window> w2(CreateTestWindow(&delegate, gfx::Rect()));
+ scoped_ptr<aura::Window> w3(CreateTestWindow(&delegate, gfx::Rect()));
+
+ // Get into split-view mode, and then turn on overview mode.
+ wm_api.GetSplitViewController()->ActivateSplitMode(NULL, NULL);
+ WindowManager::GetInstance()->ToggleOverview();
+ EXPECT_TRUE(wm_api.GetSplitViewController()->IsSplitViewModeActive());
+ EXPECT_EQ(w3.get(), wm_api.GetSplitViewController()->left_window());
+ EXPECT_EQ(w2.get(), wm_api.GetSplitViewController()->right_window());
+
+ WindowOverviewModeDelegate* overview_delegate = wm_api.wm();
+ overview_delegate->OnSelectWindow(w1.get());
+ EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive());
+}
+
} // namespace athena
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | athena/wm/window_overview_mode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698