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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "ui/aura/test/test_windows.h" | 51 #include "ui/aura/test/test_windows.h" |
52 #include "ui/aura/window_targeter.h" | 52 #include "ui/aura/window_targeter.h" |
53 #endif | 53 #endif |
54 | 54 |
55 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | 55 #if defined(USE_AURA) && !defined(OS_CHROMEOS) |
56 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" | 56 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h" |
57 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 57 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
58 #endif | 58 #endif |
59 | 59 |
60 #if defined(USE_ASH) | 60 #if defined(USE_ASH) |
| 61 #include "ash/aura/wm_window_aura.h" |
61 #include "ash/common/wm/root_window_finder.h" | 62 #include "ash/common/wm/root_window_finder.h" |
62 #include "ash/common/wm/window_state.h" | 63 #include "ash/common/wm/window_state.h" |
63 #include "ash/display/display_manager.h" | 64 #include "ash/display/display_manager.h" |
64 #include "ash/shell.h" | 65 #include "ash/shell.h" |
65 #include "ash/test/cursor_manager_test_api.h" | 66 #include "ash/test/cursor_manager_test_api.h" |
66 #include "ash/wm/aura/wm_window_aura.h" | |
67 #include "ash/wm/window_state_aura.h" | 67 #include "ash/wm/window_state_aura.h" |
68 #include "ash/wm/window_util.h" | 68 #include "ash/wm/window_util.h" |
69 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 69 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
70 #include "ui/aura/client/screen_position_client.h" | 70 #include "ui/aura/client/screen_position_client.h" |
71 #include "ui/aura/test/event_generator_delegate_aura.h" | 71 #include "ui/aura/test/event_generator_delegate_aura.h" |
72 #include "ui/aura/window_event_dispatcher.h" | 72 #include "ui/aura/window_event_dispatcher.h" |
73 #include "ui/events/test/event_generator.h" | 73 #include "ui/events/test/event_generator.h" |
74 #endif | 74 #endif |
75 | 75 |
76 using content::WebContents; | 76 using content::WebContents; |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 return strstr(GetParam(), "mouse") ? | 385 return strstr(GetParam(), "mouse") ? |
386 INPUT_SOURCE_MOUSE : INPUT_SOURCE_TOUCH; | 386 INPUT_SOURCE_MOUSE : INPUT_SOURCE_TOUCH; |
387 } | 387 } |
388 | 388 |
389 // Set root window from a point in screen coordinates | 389 // Set root window from a point in screen coordinates |
390 void SetEventGeneratorRootWindow(const gfx::Point& point) { | 390 void SetEventGeneratorRootWindow(const gfx::Point& point) { |
391 if (input_source() == INPUT_SOURCE_MOUSE) | 391 if (input_source() == INPUT_SOURCE_MOUSE) |
392 return; | 392 return; |
393 #if defined(OS_CHROMEOS) | 393 #if defined(OS_CHROMEOS) |
394 event_generator_.reset(new ui::test::EventGenerator( | 394 event_generator_.reset(new ui::test::EventGenerator( |
395 new ScreenEventGeneratorDelegate(ash::wm::WmWindowAura::GetAuraWindow( | 395 new ScreenEventGeneratorDelegate(ash::WmWindowAura::GetAuraWindow( |
396 ash::wm::GetRootWindowAt(point))))); | 396 ash::wm::GetRootWindowAt(point))))); |
397 #endif | 397 #endif |
398 } | 398 } |
399 | 399 |
400 // The following methods update one of the mouse or touch input depending upon | 400 // The following methods update one of the mouse or touch input depending upon |
401 // the InputSource. | 401 // the InputSource. |
402 bool PressInput(const gfx::Point& location) { | 402 bool PressInput(const gfx::Point& location) { |
403 if (input_source() == INPUT_SOURCE_MOUSE) { | 403 if (input_source() == INPUT_SOURCE_MOUSE) { |
404 return ui_test_utils::SendMouseMoveSync(location) && | 404 return ui_test_utils::SendMouseMoveSync(location) && |
405 ui_test_utils::SendMouseEventsSync( | 405 ui_test_utils::SendMouseEventsSync( |
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2477 DetachToBrowserTabDragControllerTest, | 2477 DetachToBrowserTabDragControllerTest, |
2478 ::testing::Values("mouse", "touch")); | 2478 ::testing::Values("mouse", "touch")); |
2479 INSTANTIATE_TEST_CASE_P(TabDragging, | 2479 INSTANTIATE_TEST_CASE_P(TabDragging, |
2480 DetachToBrowserTabDragControllerTestTouch, | 2480 DetachToBrowserTabDragControllerTestTouch, |
2481 ::testing::Values("touch")); | 2481 ::testing::Values("touch")); |
2482 #else | 2482 #else |
2483 INSTANTIATE_TEST_CASE_P(TabDragging, | 2483 INSTANTIATE_TEST_CASE_P(TabDragging, |
2484 DetachToBrowserTabDragControllerTest, | 2484 DetachToBrowserTabDragControllerTest, |
2485 ::testing::Values("mouse")); | 2485 ::testing::Values("mouse")); |
2486 #endif | 2486 #endif |
OLD | NEW |