| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/drag_drop/drag_drop_controller.h" | 5 #include "ash/drag_drop/drag_drop_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/test/ash_interactive_ui_test_base.h" | 8 #include "ash/test/ash_interactive_ui_test_base.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 void DragDropAcrossMultiDisplay_Step1() { | 106 void DragDropAcrossMultiDisplay_Step1() { |
| 107 ui_controls::SendMouseEventsNotifyWhenDone( | 107 ui_controls::SendMouseEventsNotifyWhenDone( |
| 108 ui_controls::LEFT, ui_controls::DOWN, | 108 ui_controls::LEFT, ui_controls::DOWN, |
| 109 base::Bind(&DragDropAcrossMultiDisplay_Step2)); | 109 base::Bind(&DragDropAcrossMultiDisplay_Step2)); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace | 112 } // namespace |
| 113 | 113 |
| 114 using DragDropTest = test::AshInteractiveUITestBase; | 114 using DragDropTest = test::AshInteractiveUITestBase; |
| 115 | 115 |
| 116 #if !defined(OS_CHROMEOS) | |
| 117 #define MAYBE_DragDropAcrossMultiDisplay DISABLED_DragDropAcrossMultiDisplay | |
| 118 #else | |
| 119 #define MAYBE_DragDropAcrossMultiDisplay DragDropAcrossMultiDisplay | |
| 120 #endif | |
| 121 | |
| 122 // Test if the mouse gets moved properly to another display | 116 // Test if the mouse gets moved properly to another display |
| 123 // during drag & drop operation. | 117 // during drag & drop operation. |
| 124 TEST_F(DragDropTest, MAYBE_DragDropAcrossMultiDisplay) { | 118 TEST_F(DragDropTest, DragDropAcrossMultiDisplay) { |
| 125 if (!SupportsMultipleDisplays()) | 119 if (!SupportsMultipleDisplays()) |
| 126 return; | 120 return; |
| 127 | 121 |
| 128 UpdateDisplay("400x400,400x400"); | 122 UpdateDisplay("400x400,400x400"); |
| 129 aura::Window::Windows root_windows = | 123 aura::Window::Windows root_windows = |
| 130 Shell::GetInstance()->GetAllRootWindows(); | 124 Shell::GetInstance()->GetAllRootWindows(); |
| 131 views::View* draggable_view = new DraggableView(); | 125 views::View* draggable_view = new DraggableView(); |
| 132 draggable_view->set_drag_controller(NULL); | 126 draggable_view->set_drag_controller(NULL); |
| 133 draggable_view->SetBounds(0, 0, 100, 100); | 127 draggable_view->SetBounds(0, 0, 100, 100); |
| 134 views::Widget* source = | 128 views::Widget* source = |
| (...skipping 13 matching lines...) Expand all Loading... |
| 148 | 142 |
| 149 base::RunLoop().Run(); | 143 base::RunLoop().Run(); |
| 150 | 144 |
| 151 EXPECT_TRUE(target_view->dropped()); | 145 EXPECT_TRUE(target_view->dropped()); |
| 152 | 146 |
| 153 source->Close(); | 147 source->Close(); |
| 154 target->Close(); | 148 target->Close(); |
| 155 } | 149 } |
| 156 | 150 |
| 157 } // namespace ash | 151 } // namespace ash |
| OLD | NEW |