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 "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" | 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 57 #if defined(USE_AURA) && !defined(OS_CHROMEOS) |
58 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" | 58 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" |
59 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 59 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
60 #endif | 60 #endif |
61 | 61 |
62 #if defined(USE_ASH) | 62 #if defined(USE_ASH) |
63 #include "ash/aura/wm_window_aura.h" | 63 #include "ash/aura/wm_window_aura.h" |
64 #include "ash/common/wm/root_window_finder.h" | 64 #include "ash/common/wm/root_window_finder.h" |
65 #include "ash/common/wm/window_state.h" | 65 #include "ash/common/wm/window_state.h" |
66 #include "ash/display/display_manager.h" | |
67 #include "ash/shell.h" | 66 #include "ash/shell.h" |
68 #include "ash/test/cursor_manager_test_api.h" | 67 #include "ash/test/cursor_manager_test_api.h" |
69 #include "ash/test/immersive_fullscreen_controller_test_api.h" | 68 #include "ash/test/immersive_fullscreen_controller_test_api.h" |
70 #include "ash/wm/window_state_aura.h" | 69 #include "ash/wm/window_state_aura.h" |
71 #include "ash/wm/window_util.h" | 70 #include "ash/wm/window_util.h" |
72 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 71 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
73 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" | 72 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" |
74 #include "ui/aura/client/screen_position_client.h" | 73 #include "ui/aura/client/screen_position_client.h" |
75 #include "ui/aura/test/event_generator_delegate_aura.h" | 74 #include "ui/aura/test/event_generator_delegate_aura.h" |
76 #include "ui/aura/window_event_dispatcher.h" | 75 #include "ui/aura/window_event_dispatcher.h" |
| 76 #include "ui/display/manager/display_manager.h" |
77 #include "ui/events/test/event_generator.h" | 77 #include "ui/events/test/event_generator.h" |
78 #endif | 78 #endif |
79 | 79 |
80 using content::WebContents; | 80 using content::WebContents; |
81 | 81 |
82 namespace test { | 82 namespace test { |
83 | 83 |
84 namespace { | 84 namespace { |
85 | 85 |
86 const char kTabDragControllerInteractiveUITestUserDataKey[] = | 86 const char kTabDragControllerInteractiveUITestUserDataKey[] = |
(...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 | 2240 |
2241 // Invoked from the nested message loop. | 2241 // Invoked from the nested message loop. |
2242 void CancelDragTabToWindowInSeparateDisplayStep3( | 2242 void CancelDragTabToWindowInSeparateDisplayStep3( |
2243 TabStrip* tab_strip, | 2243 TabStrip* tab_strip, |
2244 const BrowserList* browser_list) { | 2244 const BrowserList* browser_list) { |
2245 ASSERT_FALSE(tab_strip->IsDragSessionActive()); | 2245 ASSERT_FALSE(tab_strip->IsDragSessionActive()); |
2246 ASSERT_TRUE(TabDragController::IsActive()); | 2246 ASSERT_TRUE(TabDragController::IsActive()); |
2247 ASSERT_EQ(2u, browser_list->size()); | 2247 ASSERT_EQ(2u, browser_list->size()); |
2248 | 2248 |
2249 // Switching display mode should cancel the drag operation. | 2249 // Switching display mode should cancel the drag operation. |
2250 ash::DisplayManager* display_manager = | 2250 display::DisplayManager* display_manager = |
2251 ash::Shell::GetInstance()->display_manager(); | 2251 ash::Shell::GetInstance()->display_manager(); |
2252 display_manager->AddRemoveDisplay(); | 2252 display_manager->AddRemoveDisplay(); |
2253 } | 2253 } |
2254 | 2254 |
2255 // Invoked from the nested message loop. | 2255 // Invoked from the nested message loop. |
2256 void CancelDragTabToWindowInSeparateDisplayStep2( | 2256 void CancelDragTabToWindowInSeparateDisplayStep2( |
2257 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest* test, | 2257 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest* test, |
2258 TabStrip* tab_strip, | 2258 TabStrip* tab_strip, |
2259 aura::Window* current_root, | 2259 aura::Window* current_root, |
2260 gfx::Point final_destination, | 2260 gfx::Point final_destination, |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2499 DetachToBrowserTabDragControllerTest, | 2499 DetachToBrowserTabDragControllerTest, |
2500 ::testing::Values("mouse", "touch")); | 2500 ::testing::Values("mouse", "touch")); |
2501 INSTANTIATE_TEST_CASE_P(TabDragging, | 2501 INSTANTIATE_TEST_CASE_P(TabDragging, |
2502 DetachToBrowserTabDragControllerTestTouch, | 2502 DetachToBrowserTabDragControllerTestTouch, |
2503 ::testing::Values("touch")); | 2503 ::testing::Values("touch")); |
2504 #else | 2504 #else |
2505 INSTANTIATE_TEST_CASE_P(TabDragging, | 2505 INSTANTIATE_TEST_CASE_P(TabDragging, |
2506 DetachToBrowserTabDragControllerTest, | 2506 DetachToBrowserTabDragControllerTest, |
2507 ::testing::Values("mouse")); | 2507 ::testing::Values("mouse")); |
2508 #endif | 2508 #endif |
OLD | NEW |