| 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 #include "ui/aura/window_targeter.h" | 56 #include "ui/aura/window_targeter.h" |
| 57 #endif | 57 #endif |
| 58 | 58 |
| 59 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 59 #if defined(USE_AURA) && !defined(OS_CHROMEOS) |
| 60 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" | 60 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" |
| 61 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 61 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 #if defined(USE_ASH) | 64 #if defined(USE_ASH) |
| 65 #include "ash/aura/wm_window_aura.h" | 65 #include "ash/aura/wm_window_aura.h" |
| 66 #include "ash/common/ash_switches.h" |
| 66 #include "ash/common/wm/root_window_finder.h" | 67 #include "ash/common/wm/root_window_finder.h" |
| 67 #include "ash/common/wm/window_state.h" | 68 #include "ash/common/wm/window_state.h" |
| 68 #include "ash/shell.h" | 69 #include "ash/shell.h" |
| 69 #include "ash/test/cursor_manager_test_api.h" | 70 #include "ash/test/cursor_manager_test_api.h" |
| 70 #include "ash/test/immersive_fullscreen_controller_test_api.h" | 71 #include "ash/test/immersive_fullscreen_controller_test_api.h" |
| 71 #include "ash/wm/window_state_aura.h" | 72 #include "ash/wm/window_state_aura.h" |
| 72 #include "ash/wm/window_util.h" | 73 #include "ash/wm/window_util.h" |
| 73 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 74 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| 74 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" | 75 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" |
| 75 #include "ui/aura/client/screen_position_client.h" | 76 #include "ui/aura/client/screen_position_client.h" |
| (...skipping 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2467 test, | 2468 test, |
| 2468 gfx::Point(target_point.x(), 1 + target_point.y()), | 2469 gfx::Point(target_point.x(), 1 + target_point.y()), |
| 2469 iteration - 1))); | 2470 iteration - 1))); |
| 2470 } | 2471 } |
| 2471 | 2472 |
| 2472 } // namespace | 2473 } // namespace |
| 2473 | 2474 |
| 2474 // Drags from browser to separate window, docks that window and releases mouse. | 2475 // Drags from browser to separate window, docks that window and releases mouse. |
| 2475 IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, | 2476 IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest, |
| 2476 DetachToDockedWindowFromMaximizedWindow) { | 2477 DetachToDockedWindowFromMaximizedWindow) { |
| 2478 // Enable docked windows for this test. |
| 2479 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 2480 ash::switches::kAshEnableDockedWindows); |
| 2481 |
| 2477 // Maximize the initial browser window. | 2482 // Maximize the initial browser window. |
| 2478 browser()->window()->Maximize(); | 2483 browser()->window()->Maximize(); |
| 2479 ASSERT_TRUE(browser()->window()->IsMaximized()); | 2484 ASSERT_TRUE(browser()->window()->IsMaximized()); |
| 2480 | 2485 |
| 2481 // Add another tab. | 2486 // Add another tab. |
| 2482 AddTabAndResetBrowser(browser()); | 2487 AddTabAndResetBrowser(browser()); |
| 2483 TabStrip* tab_strip = GetTabStripForBrowser(browser()); | 2488 TabStrip* tab_strip = GetTabStripForBrowser(browser()); |
| 2484 | 2489 |
| 2485 // Move to the first tab and drag it enough so that it detaches. | 2490 // Move to the first tab and drag it enough so that it detaches. |
| 2486 gfx::Point tab_0_center( | 2491 gfx::Point tab_0_center( |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2543 DetachToBrowserTabDragControllerTest, | 2548 DetachToBrowserTabDragControllerTest, |
| 2544 ::testing::Values("mouse", "touch")); | 2549 ::testing::Values("mouse", "touch")); |
| 2545 INSTANTIATE_TEST_CASE_P(TabDragging, | 2550 INSTANTIATE_TEST_CASE_P(TabDragging, |
| 2546 DetachToBrowserTabDragControllerTestTouch, | 2551 DetachToBrowserTabDragControllerTestTouch, |
| 2547 ::testing::Values("touch")); | 2552 ::testing::Values("touch")); |
| 2548 #else | 2553 #else |
| 2549 INSTANTIATE_TEST_CASE_P(TabDragging, | 2554 INSTANTIATE_TEST_CASE_P(TabDragging, |
| 2550 DetachToBrowserTabDragControllerTest, | 2555 DetachToBrowserTabDragControllerTest, |
| 2551 ::testing::Values("mouse")); | 2556 ::testing::Values("mouse")); |
| 2552 #endif | 2557 #endif |
| OLD | NEW |