OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |