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

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: Merge with master. Created 6 years, 9 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 | « ash/wm/overview/window_selector_controller.cc ('k') | ash/wm/panels/panel_layout_manager.cc » ('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 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/drag_drop/drag_drop_controller.h" 5 #include "ash/drag_drop/drag_drop_controller.h"
6 #include "ash/root_window_controller.h" 6 #include "ash/root_window_controller.h"
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_widget.h" 9 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); 308 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
309 EXPECT_FALSE(panel1->IsVisible()); 309 EXPECT_FALSE(panel1->IsVisible());
310 310
311 // Entering overview and selecting another window, the previous window remains 311 // Entering overview and selecting another window, the previous window remains
312 // fullscreen. 312 // fullscreen.
313 // TODO(flackr): Currently the panel remains hidden, but should become visible 313 // TODO(flackr): Currently the panel remains hidden, but should become visible
314 // again. 314 // again.
315 ToggleOverview(); 315 ToggleOverview();
316 ClickWindow(window2.get()); 316 ClickWindow(window2.get());
317 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); 317 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
318
319 // Verify that selecting the panel will make it visible.
320 // TODO(flackr): Click on panel rather than cycle to it when
321 // clicking on panels is fixed, see http://crbug.com/339834.
322 Cycle(WindowSelector::FORWARD);
323 Cycle(WindowSelector::FORWARD);
324 StopCycling();
325 EXPECT_TRUE(wm::GetWindowState(panel1.get())->IsActive());
326 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen());
327 EXPECT_TRUE(panel1->IsVisible());
318 } 328 }
319 329
320 // Tests that the shelf dimming state is removed while in overview and restored 330 // Tests that the shelf dimming state is removed while in overview and restored
321 // on exiting overview. 331 // on exiting overview.
322 TEST_F(WindowSelectorTest, OverviewUndimsShelf) { 332 TEST_F(WindowSelectorTest, OverviewUndimsShelf) {
323 gfx::Rect bounds(0, 0, 400, 400); 333 gfx::Rect bounds(0, 0, 400, 400);
324 scoped_ptr<aura::Window> window1(CreateWindow(bounds)); 334 scoped_ptr<aura::Window> window1(CreateWindow(bounds));
325 wm::WindowState* window_state = wm::GetWindowState(window1.get()); 335 wm::WindowState* window_state = wm::GetWindowState(window1.get());
326 window_state->Maximize(); 336 window_state->Maximize();
327 ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf(); 337 ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf();
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 ui::MouseEvent event(ui::ET_MOUSE_MOVED, points[p], points[p], 1081 ui::MouseEvent event(ui::ET_MOUSE_MOVED, points[p], points[p],
1072 ui::EF_NONE, ui::EF_NONE); 1082 ui::EF_NONE, ui::EF_NONE);
1073 EXPECT_EQ(windows[w], 1083 EXPECT_EQ(windows[w],
1074 targeter->FindTargetForEvent(root_target, &event)); 1084 targeter->FindTargetForEvent(root_target, &event));
1075 } 1085 }
1076 } 1086 }
1077 } 1087 }
1078 1088
1079 } // namespace internal 1089 } // namespace internal
1080 } // namespace ash 1090 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector_controller.cc ('k') | ash/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698