| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "ash/common/accessibility_delegate.h" | 8 #include "ash/common/accessibility_delegate.h" |
| 9 #include "ash/common/accessibility_types.h" | 9 #include "ash/common/accessibility_types.h" |
| 10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| (...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); | 1198 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 // Tests that entering overview when a fullscreen window is active in maximized | 1201 // Tests that entering overview when a fullscreen window is active in maximized |
| 1202 // mode correctly applies the transformations to the window and correctly | 1202 // mode correctly applies the transformations to the window and correctly |
| 1203 // updates the window bounds on exiting overview mode: http://crbug.com/401664. | 1203 // updates the window bounds on exiting overview mode: http://crbug.com/401664. |
| 1204 TEST_F(WindowSelectorTest, FullscreenWindowMaximizeMode) { | 1204 TEST_F(WindowSelectorTest, FullscreenWindowMaximizeMode) { |
| 1205 gfx::Rect bounds(0, 0, 400, 400); | 1205 gfx::Rect bounds(0, 0, 400, 400); |
| 1206 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); | 1206 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| 1207 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); | 1207 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); |
| 1208 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( | 1208 Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( |
| 1209 true); | 1209 true); |
| 1210 wm::ActivateWindow(window2.get()); | 1210 wm::ActivateWindow(window2.get()); |
| 1211 wm::ActivateWindow(window1.get()); | 1211 wm::ActivateWindow(window1.get()); |
| 1212 gfx::Rect normal_window_bounds(window1->bounds()); | 1212 gfx::Rect normal_window_bounds(window1->bounds()); |
| 1213 const wm::WMEvent toggle_fullscreen_event(wm::WM_EVENT_TOGGLE_FULLSCREEN); | 1213 const wm::WMEvent toggle_fullscreen_event(wm::WM_EVENT_TOGGLE_FULLSCREEN); |
| 1214 wm::GetWindowState(window1.get())->OnWMEvent(&toggle_fullscreen_event); | 1214 wm::GetWindowState(window1.get())->OnWMEvent(&toggle_fullscreen_event); |
| 1215 gfx::Rect fullscreen_window_bounds(window1->bounds()); | 1215 gfx::Rect fullscreen_window_bounds(window1->bounds()); |
| 1216 EXPECT_NE(normal_window_bounds.ToString(), | 1216 EXPECT_NE(normal_window_bounds.ToString(), |
| 1217 fullscreen_window_bounds.ToString()); | 1217 fullscreen_window_bounds.ToString()); |
| 1218 EXPECT_EQ(fullscreen_window_bounds.ToString(), | 1218 EXPECT_EQ(fullscreen_window_bounds.ToString(), |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 2164 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
| 2165 ASSERT_TRUE(resizer.get()); | 2165 ASSERT_TRUE(resizer.get()); |
| 2166 gfx::Point location = resizer->GetInitialLocation(); | 2166 gfx::Point location = resizer->GetInitialLocation(); |
| 2167 location.Offset(20, 20); | 2167 location.Offset(20, 20); |
| 2168 resizer->Drag(location, 0); | 2168 resizer->Drag(location, 0); |
| 2169 ToggleOverview(); | 2169 ToggleOverview(); |
| 2170 resizer->RevertDrag(); | 2170 resizer->RevertDrag(); |
| 2171 } | 2171 } |
| 2172 | 2172 |
| 2173 } // namespace ash | 2173 } // namespace ash |
| OLD | NEW |