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

Side by Side Diff: ash/wm/overview/window_selector_unittest.cc

Issue 149493008: Use active window if on current workspace for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 #include "ash/screen_util.h" 6 #include "ash/screen_util.h"
7 #include "ash/shelf/shelf.h" 7 #include "ash/shelf/shelf.h"
8 #include "ash/shelf/shelf_widget.h" 8 #include "ash/shelf/shelf_widget.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); 285 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
286 EXPECT_FALSE(panel1->IsVisible()); 286 EXPECT_FALSE(panel1->IsVisible());
287 287
288 // Entering overview and selecting another window, the previous window remains 288 // Entering overview and selecting another window, the previous window remains
289 // fullscreen. 289 // fullscreen.
290 // TODO(flackr): Currently the panel remains hidden, but should become visible 290 // TODO(flackr): Currently the panel remains hidden, but should become visible
291 // again. 291 // again.
292 ToggleOverview(); 292 ToggleOverview();
293 ClickWindow(window2.get()); 293 ClickWindow(window2.get());
294 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); 294 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
295
296 // Verify that selecting the panel will make it visible.
297 // TODO(flackr): Click on panel rather than cycle to it when
298 // clicking on panels is fixed, see http://crbug.com/339834.
299 Cycle(WindowSelector::FORWARD);
300 Cycle(WindowSelector::FORWARD);
301 StopCycling();
302 EXPECT_TRUE(wm::GetWindowState(panel1.get())->IsActive());
303 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
304 EXPECT_TRUE(panel1->IsVisible());
295 } 305 }
296 306
297 // Tests that the shelf dimming state is removed while in overview and restored 307 // Tests that the shelf dimming state is removed while in overview and restored
298 // on exiting overview. 308 // on exiting overview.
299 TEST_F(WindowSelectorTest, OverviewUndimsShelf) { 309 TEST_F(WindowSelectorTest, OverviewUndimsShelf) {
300 gfx::Rect bounds(0, 0, 400, 400); 310 gfx::Rect bounds(0, 0, 400, 400);
301 scoped_ptr<aura::Window> window1(CreateWindow(bounds)); 311 scoped_ptr<aura::Window> window1(CreateWindow(bounds));
302 wm::WindowState* window_state = wm::GetWindowState(window1.get()); 312 wm::WindowState* window_state = wm::GetWindowState(window1.get());
303 window_state->Maximize(); 313 window_state->Maximize();
304 ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf(); 314 ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf();
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 wm::ActivateWindow(window1.get()); 1000 wm::ActivateWindow(window1.get());
991 1001
992 ToggleOverview(); 1002 ToggleOverview();
993 EXPECT_TRUE(IsSelecting()); 1003 EXPECT_TRUE(IsSelecting());
994 UpdateDisplay("400x400"); 1004 UpdateDisplay("400x400");
995 EXPECT_FALSE(IsSelecting()); 1005 EXPECT_FALSE(IsSelecting());
996 } 1006 }
997 1007
998 } // namespace internal 1008 } // namespace internal
999 } // namespace ash 1009 } // namespace ash
OLDNEW
« ash/wm/mru_window_tracker.cc ('K') | « ash/wm/overview/window_selector_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698