| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Test if the mouse gets moved properly to another display | 116 // Test if the mouse gets moved properly to another display |
| 117 // during drag & drop operation. | 117 // during drag & drop operation. |
| 118 TEST_F(DragDropTest, DragDropAcrossMultiDisplay) { | 118 TEST_F(DragDropTest, DragDropAcrossMultiDisplay) { |
| 119 if (!SupportsMultipleDisplays()) | |
| 120 return; | |
| 121 | |
| 122 UpdateDisplay("400x400,400x400"); | 119 UpdateDisplay("400x400,400x400"); |
| 123 aura::Window::Windows root_windows = | 120 aura::Window::Windows root_windows = |
| 124 Shell::GetInstance()->GetAllRootWindows(); | 121 Shell::GetInstance()->GetAllRootWindows(); |
| 125 views::View* draggable_view = new DraggableView(); | 122 views::View* draggable_view = new DraggableView(); |
| 126 draggable_view->set_drag_controller(NULL); | 123 draggable_view->set_drag_controller(NULL); |
| 127 draggable_view->SetBounds(0, 0, 100, 100); | 124 draggable_view->SetBounds(0, 0, 100, 100); |
| 128 views::Widget* source = | 125 views::Widget* source = |
| 129 CreateWidget(draggable_view, gfx::Rect(0, 0, 100, 100)); | 126 CreateWidget(draggable_view, gfx::Rect(0, 0, 100, 100)); |
| 130 | 127 |
| 131 TargetView* target_view = new TargetView(); | 128 TargetView* target_view = new TargetView(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 142 | 139 |
| 143 base::RunLoop().Run(); | 140 base::RunLoop().Run(); |
| 144 | 141 |
| 145 EXPECT_TRUE(target_view->dropped()); | 142 EXPECT_TRUE(target_view->dropped()); |
| 146 | 143 |
| 147 source->Close(); | 144 source->Close(); |
| 148 target->Close(); | 145 target->Close(); |
| 149 } | 146 } |
| 150 | 147 |
| 151 } // namespace ash | 148 } // namespace ash |
| OLD | NEW |