| 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/launcher/launcher.h" | 5 #include "ash/launcher/launcher.h" |
| 6 #include "ash/root_window_controller.h" | 6 #include "ash/root_window_controller.h" |
| 7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 // The panel becomes temporarily visible for the overview. | 278 // The panel becomes temporarily visible for the overview. |
| 279 EXPECT_TRUE(panel1->IsVisible()); | 279 EXPECT_TRUE(panel1->IsVisible()); |
| 280 ClickWindow(window1.get()); | 280 ClickWindow(window1.get()); |
| 281 | 281 |
| 282 // The window is still fullscreen as it was selected. The panel should again | 282 // The window is still fullscreen as it was selected. The panel should again |
| 283 // be hidden. | 283 // be hidden. |
| 284 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); | 284 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); |
| 285 EXPECT_FALSE(panel1->IsVisible()); | 285 EXPECT_FALSE(panel1->IsVisible()); |
| 286 | 286 |
| 287 // Entering overview and selecting another window should exit fullscreen. | 287 // Entering overview and selecting another window, the previous window remains |
| 288 // fullscreen. |
| 288 // TODO(flackr): Currently the panel remains hidden, but should become visible | 289 // TODO(flackr): Currently the panel remains hidden, but should become visible |
| 289 // again. | 290 // again. |
| 290 ToggleOverview(); | 291 ToggleOverview(); |
| 291 ClickWindow(window2.get()); | 292 ClickWindow(window2.get()); |
| 292 EXPECT_FALSE(wm::GetWindowState(window1.get())->IsFullscreen()); | 293 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); |
| 293 } | 294 } |
| 294 | 295 |
| 295 // Tests that the shelf dimming state is removed while in overview and restored | 296 // Tests that the shelf dimming state is removed while in overview and restored |
| 296 // on exiting overview. | 297 // on exiting overview. |
| 297 TEST_F(WindowSelectorTest, OverviewUndimsShelf) { | 298 TEST_F(WindowSelectorTest, OverviewUndimsShelf) { |
| 298 gfx::Rect bounds(0, 0, 400, 400); | 299 gfx::Rect bounds(0, 0, 400, 400); |
| 299 scoped_ptr<aura::Window> window1(CreateWindow(bounds)); | 300 scoped_ptr<aura::Window> window1(CreateWindow(bounds)); |
| 300 wm::WindowState* window_state = wm::GetWindowState(window1.get()); | 301 wm::WindowState* window_state = wm::GetWindowState(window1.get()); |
| 301 window_state->Maximize(); | 302 window_state->Maximize(); |
| 302 ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf(); | 303 ash::ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf(); |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 ToEnclosingRect(GetTransformedTargetBounds(window1.get())); | 941 ToEnclosingRect(GetTransformedTargetBounds(window1.get())); |
| 941 EXPECT_EQ(overview_bounds.x(), new_overview_bounds.x()); | 942 EXPECT_EQ(overview_bounds.x(), new_overview_bounds.x()); |
| 942 EXPECT_EQ(overview_bounds.y(), new_overview_bounds.y()); | 943 EXPECT_EQ(overview_bounds.y(), new_overview_bounds.y()); |
| 943 EXPECT_EQ(overview_bounds.width(), new_overview_bounds.width()); | 944 EXPECT_EQ(overview_bounds.width(), new_overview_bounds.width()); |
| 944 EXPECT_EQ(overview_bounds.height(), new_overview_bounds.height()); | 945 EXPECT_EQ(overview_bounds.height(), new_overview_bounds.height()); |
| 945 StopCycling(); | 946 StopCycling(); |
| 946 } | 947 } |
| 947 | 948 |
| 948 } // namespace internal | 949 } // namespace internal |
| 949 } // namespace ash | 950 } // namespace ash |
| OLD | NEW |