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

Side by Side 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, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | athena/wm/window_overview_mode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/wm/public/window_manager.h" 5 #include "athena/wm/public/window_manager.h"
6 6
7 #include "athena/screen/public/screen_manager.h" 7 #include "athena/screen/public/screen_manager.h"
8 #include "athena/test/athena_test_base.h" 8 #include "athena/test/athena_test_base.h"
9 #include "athena/wm/public/window_list_provider.h" 9 #include "athena/wm/public/window_list_provider.h"
10 #include "athena/wm/split_view_controller.h" 10 #include "athena/wm/split_view_controller.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 // Toggle back to normal mode. 309 // Toggle back to normal mode.
310 generator.PressKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN); 310 generator.PressKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN);
311 generator.ReleaseKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN); 311 generator.ReleaseKey(ui::VKEY_F6, ui::EF_CONTROL_DOWN);
312 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive()); 312 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive());
313 313
314 EXPECT_EQ(width, w1->bounds().width()); 314 EXPECT_EQ(width, w1->bounds().width());
315 EXPECT_EQ(width, w2->bounds().width()); 315 EXPECT_EQ(width, w2->bounds().width());
316 } 316 }
317 317
318 TEST_F(WindowManagerTest, OverviewModeFromSplitMode) {
319 test::WindowManagerImplTestApi wm_api;
320
321 aura::test::TestWindowDelegate delegate;
322 scoped_ptr<aura::Window> w1(CreateTestWindow(&delegate, gfx::Rect()));
323 scoped_ptr<aura::Window> w2(CreateTestWindow(&delegate, gfx::Rect()));
324 scoped_ptr<aura::Window> w3(CreateTestWindow(&delegate, gfx::Rect()));
325
326 // Get into split-view mode, and then turn on overview mode.
327 wm_api.GetSplitViewController()->ActivateSplitMode(NULL, NULL);
328 WindowManager::GetInstance()->ToggleOverview();
329 EXPECT_TRUE(wm_api.GetSplitViewController()->IsSplitViewModeActive());
330 EXPECT_EQ(w3.get(), wm_api.GetSplitViewController()->left_window());
331 EXPECT_EQ(w2.get(), wm_api.GetSplitViewController()->right_window());
332
333 WindowOverviewModeDelegate* overview_delegate = wm_api.wm();
334 overview_delegate->OnSelectWindow(w1.get());
335 EXPECT_FALSE(wm_api.GetSplitViewController()->IsSplitViewModeActive());
336 }
337
318 } // namespace athena 338 } // namespace athena
OLDNEW
« 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