| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); | 294 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); |
| 295 EXPECT_FALSE(panel1->IsVisible()); | 295 EXPECT_FALSE(panel1->IsVisible()); |
| 296 | 296 |
| 297 // Entering overview and selecting another window, the previous window remains | 297 // Entering overview and selecting another window, the previous window remains |
| 298 // fullscreen. | 298 // fullscreen. |
| 299 // TODO(flackr): Currently the panel remains hidden, but should become visible | 299 // TODO(flackr): Currently the panel remains hidden, but should become visible |
| 300 // again. | 300 // again. |
| 301 ToggleOverview(); | 301 ToggleOverview(); |
| 302 ClickWindow(window2.get()); | 302 ClickWindow(window2.get()); |
| 303 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); | 303 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); |
| 304 |
| 305 // Verify that selecting the panel will make it visible. |
| 306 // TODO(flackr): Click on panel rather than cycle to it when |
| 307 // clicking on panels is fixed, see http://crbug.com/339834. |
| 308 Cycle(WindowSelector::FORWARD); |
| 309 Cycle(WindowSelector::FORWARD); |
| 310 StopCycling(); |
| 311 EXPECT_TRUE(wm::GetWindowState(panel1.get())->IsActive()); |
| 312 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); |
| 313 EXPECT_TRUE(panel1->IsVisible()); |
| 304 } | 314 } |
| 305 | 315 |
| 306 // Tests that the shelf dimming state is removed while in overview and restored | 316 // Tests that the shelf dimming state is removed while in overview and restored |
| 307 // on exiting overview. | 317 // on exiting overview. |
| 308 TEST_F(WindowSelectorTest, OverviewUndimsShelf) { | 318 TEST_F(WindowSelectorTest, OverviewUndimsShelf) { |
| 309 gfx::Rect bounds(0, 0, 400, 400); | 319 gfx::Rect bounds(0, 0, 400, 400); |
| 310 scoped_ptr<aura::Window> window1(CreateWindow(bounds)); | 320 scoped_ptr<aura::Window> window1(CreateWindow(bounds)); |
| 311 wm::WindowState* window_state = wm::GetWindowState(window1.get()); | 321 wm::WindowState* window_state = wm::GetWindowState(window1.get()); |
| 312 window_state->Maximize(); | 322 window_state->Maximize(); |
| 313 ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf(); | 323 ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf(); |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 window.get(), gfx::Point(5, 5), ui::DragDropTypes::DRAG_MOVE, | 1035 window.get(), gfx::Point(5, 5), ui::DragDropTypes::DRAG_MOVE, |
| 1026 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); | 1036 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); |
| 1027 RunAllPendingInMessageLoop(); | 1037 RunAllPendingInMessageLoop(); |
| 1028 EXPECT_FALSE(drag_canceled_by_test); | 1038 EXPECT_FALSE(drag_canceled_by_test); |
| 1029 ASSERT_TRUE(IsSelecting()); | 1039 ASSERT_TRUE(IsSelecting()); |
| 1030 RunAllPendingInMessageLoop(); | 1040 RunAllPendingInMessageLoop(); |
| 1031 } | 1041 } |
| 1032 | 1042 |
| 1033 } // namespace internal | 1043 } // namespace internal |
| 1034 } // namespace ash | 1044 } // namespace ash |
| OLD | NEW |