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 "ash/wm/property_util.h" | 7 #include "ash/wm/property_util.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "content/public/browser/notification_service.h" | 27 #include "content/public/browser/notification_service.h" |
28 #include "content/public/browser/notification_source.h" | 28 #include "content/public/browser/notification_source.h" |
29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
30 #include "ui/gfx/screen.h" | 30 #include "ui/gfx/screen.h" |
31 #include "ui/ui_controls/ui_controls.h" | 31 #include "ui/ui_controls/ui_controls.h" |
32 #include "ui/views/view.h" | 32 #include "ui/views/view.h" |
33 #include "ui/views/widget/widget.h" | 33 #include "ui/views/widget/widget.h" |
34 | 34 |
35 #if defined(USE_ASH) | 35 #if defined(USE_ASH) |
36 #include "ash/display/display_controller.h" | 36 #include "ash/display/display_controller.h" |
37 #include "ash/display/multi_display_manager.h" | 37 #include "ash/display/display_manager.h" |
38 #include "ash/shell.h" | 38 #include "ash/shell.h" |
39 #include "ash/test/cursor_manager_test_api.h" | 39 #include "ash/test/cursor_manager_test_api.h" |
40 #include "ash/wm/cursor_manager.h" | 40 #include "ash/wm/cursor_manager.h" |
41 #include "ash/wm/window_util.h" | 41 #include "ash/wm/window_util.h" |
42 #include "ui/aura/test/event_generator.h" | 42 #include "ui/aura/test/event_generator.h" |
43 #include "ui/aura/root_window.h" | 43 #include "ui/aura/root_window.h" |
44 #endif | 44 #endif |
45 | 45 |
46 namespace test { | 46 namespace test { |
47 | 47 |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 }; | 1279 }; |
1280 | 1280 |
1281 // Invoked from the nested message loop. | 1281 // Invoked from the nested message loop. |
1282 void CancelDragTabToWindowInSeparateDisplayStep3( | 1282 void CancelDragTabToWindowInSeparateDisplayStep3( |
1283 TabStrip* tab_strip) { | 1283 TabStrip* tab_strip) { |
1284 ASSERT_FALSE(tab_strip->IsDragSessionActive()); | 1284 ASSERT_FALSE(tab_strip->IsDragSessionActive()); |
1285 ASSERT_TRUE(TabDragController::IsActive()); | 1285 ASSERT_TRUE(TabDragController::IsActive()); |
1286 ASSERT_EQ(2u, BrowserList::size()); | 1286 ASSERT_EQ(2u, BrowserList::size()); |
1287 | 1287 |
1288 // Switching display mode should cancel the drag operation. | 1288 // Switching display mode should cancel the drag operation. |
1289 ash::internal::MultiDisplayManager::CycleDisplay(); | 1289 ash::internal::DisplayManager::CycleDisplay(); |
1290 } | 1290 } |
1291 | 1291 |
1292 // Invoked from the nested message loop. | 1292 // Invoked from the nested message loop. |
1293 void CancelDragTabToWindowInSeparateDisplayStep2( | 1293 void CancelDragTabToWindowInSeparateDisplayStep2( |
1294 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest* test, | 1294 DetachToBrowserInSeparateDisplayAndCancelTabDragControllerTest* test, |
1295 TabStrip* tab_strip, | 1295 TabStrip* tab_strip, |
1296 aura::RootWindow* current_root, | 1296 aura::RootWindow* current_root, |
1297 gfx::Point final_destination) { | 1297 gfx::Point final_destination) { |
1298 ASSERT_FALSE(tab_strip->IsDragSessionActive()); | 1298 ASSERT_FALSE(tab_strip->IsDragSessionActive()); |
1299 ASSERT_TRUE(TabDragController::IsActive()); | 1299 ASSERT_TRUE(TabDragController::IsActive()); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 DifferentDeviceScaleFactorDisplayTabDragControllerTest, | 1402 DifferentDeviceScaleFactorDisplayTabDragControllerTest, |
1403 ::testing::Values("mouse")); | 1403 ::testing::Values("mouse")); |
1404 INSTANTIATE_TEST_CASE_P(TabDragging, | 1404 INSTANTIATE_TEST_CASE_P(TabDragging, |
1405 DetachToBrowserTabDragControllerTest, | 1405 DetachToBrowserTabDragControllerTest, |
1406 ::testing::Values("mouse", "touch")); | 1406 ::testing::Values("mouse", "touch")); |
1407 #else | 1407 #else |
1408 INSTANTIATE_TEST_CASE_P(TabDragging, | 1408 INSTANTIATE_TEST_CASE_P(TabDragging, |
1409 DetachToBrowserTabDragControllerTest, | 1409 DetachToBrowserTabDragControllerTest, |
1410 ::testing::Values("mouse")); | 1410 ::testing::Values("mouse")); |
1411 #endif | 1411 #endif |
OLD | NEW |