OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/workspace/workspace_event_handler.h" | 5 #include "ash/wm/workspace/workspace_event_handler.h" |
6 | 6 |
7 #include "ash/screen_ash.h" | 7 #include "ash/screen_util.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
11 #include "ash/wm/window_util.h" | 11 #include "ash/wm/window_util.h" |
12 #include "ash/wm/workspace_controller.h" | 12 #include "ash/wm/workspace_controller.h" |
13 #include "ash/wm/workspace_controller_test_helper.h" | 13 #include "ash/wm/workspace_controller_test_helper.h" |
14 #include "ui/aura/client/aura_constants.h" | 14 #include "ui/aura/client/aura_constants.h" |
15 #include "ui/aura/client/window_move_client.h" | 15 #include "ui/aura/client/window_move_client.h" |
16 #include "ui/aura/root_window.h" | 16 #include "ui/aura/root_window.h" |
17 #include "ui/aura/test/event_generator.h" | 17 #include "ui/aura/test/event_generator.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString()); | 149 EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString()); |
150 | 150 |
151 #if defined(OS_WIN) | 151 #if defined(OS_WIN) |
152 // Multi display test does not run on Win8 bot. crbug.com/247427. | 152 // Multi display test does not run on Win8 bot. crbug.com/247427. |
153 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | 153 if (base::win::GetVersion() >= base::win::VERSION_WIN8) |
154 return; | 154 return; |
155 #endif | 155 #endif |
156 | 156 |
157 // Verify the double clicking the resize edge works on 2nd display too. | 157 // Verify the double clicking the resize edge works on 2nd display too. |
158 UpdateDisplay("200x200,400x300"); | 158 UpdateDisplay("200x200,400x300"); |
159 gfx::Rect work_area2 = ScreenAsh::GetSecondaryDisplay().work_area(); | 159 gfx::Rect work_area2 = ScreenUtil::GetSecondaryDisplay().work_area(); |
160 restored_bounds.SetRect(220,20, 50, 50); | 160 restored_bounds.SetRect(220,20, 50, 50); |
161 window->SetBoundsInScreen(restored_bounds, ScreenAsh::GetSecondaryDisplay()); | 161 window->SetBoundsInScreen(restored_bounds, ScreenUtil::GetSecondaryDisplay()); |
162 aura::Window* second_root = Shell::GetAllRootWindows()[1]; | 162 aura::Window* second_root = Shell::GetAllRootWindows()[1]; |
163 EXPECT_EQ(second_root, window->GetRootWindow()); | 163 EXPECT_EQ(second_root, window->GetRootWindow()); |
164 aura::test::EventGenerator generator2(second_root, window.get()); | 164 aura::test::EventGenerator generator2(second_root, window.get()); |
165 | 165 |
166 // Y-axis maximization. | 166 // Y-axis maximization. |
167 wd.set_window_component(HTTOP); | 167 wd.set_window_component(HTTOP); |
168 generator2.PressLeftButton(); | 168 generator2.PressLeftButton(); |
169 generator2.ReleaseLeftButton(); | 169 generator2.ReleaseLeftButton(); |
170 generator2.set_flags(ui::EF_IS_DOUBLE_CLICK); | 170 generator2.set_flags(ui::EF_IS_DOUBLE_CLICK); |
171 generator2.PressLeftButton(); | 171 generator2.PressLeftButton(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->GetRootWindow())); | 342 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->GetRootWindow())); |
343 base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); | 343 base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); |
344 aura::client::GetWindowMoveClient(window->GetRootWindow()) | 344 aura::client::GetWindowMoveClient(window->GetRootWindow()) |
345 ->RunMoveLoop(window.release(), | 345 ->RunMoveLoop(window.release(), |
346 gfx::Vector2d(), | 346 gfx::Vector2d(), |
347 aura::client::WINDOW_MOVE_SOURCE_MOUSE); | 347 aura::client::WINDOW_MOVE_SOURCE_MOUSE); |
348 } | 348 } |
349 | 349 |
350 } // namespace internal | 350 } // namespace internal |
351 } // namespace ash | 351 } // namespace ash |
OLD | NEW |