| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 params.context = Shell::GetPrimaryRootWindow(); | 75 params.context = Shell::GetPrimaryRootWindow(); |
| 76 params.bounds = bounds; | 76 params.bounds = bounds; |
| 77 widget->Init(params); | 77 widget->Init(params); |
| 78 | 78 |
| 79 widget->SetContentsView(contents_view); | 79 widget->SetContentsView(contents_view); |
| 80 widget->Show(); | 80 widget->Show(); |
| 81 return widget; | 81 return widget; |
| 82 } | 82 } |
| 83 | 83 |
| 84 void QuitLoop() { | 84 void QuitLoop() { |
| 85 base::MessageLoop::current()->Quit(); | 85 base::MessageLoop::current()->QuitWhenIdle(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void DragDropAcrossMultiDisplay_Step4() { | 88 void DragDropAcrossMultiDisplay_Step4() { |
| 89 ui_controls::SendMouseEventsNotifyWhenDone( | 89 ui_controls::SendMouseEventsNotifyWhenDone( |
| 90 ui_controls::LEFT, ui_controls::UP, | 90 ui_controls::LEFT, ui_controls::UP, |
| 91 base::Bind(&QuitLoop)); | 91 base::Bind(&QuitLoop)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void DragDropAcrossMultiDisplay_Step3() { | 94 void DragDropAcrossMultiDisplay_Step3() { |
| 95 // Move to the edge of the 1st display so that the mouse | 95 // Move to the edge of the 1st display so that the mouse |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 base::MessageLoop::current()->Run(); | 151 base::MessageLoop::current()->Run(); |
| 152 | 152 |
| 153 EXPECT_TRUE(target_view->dropped()); | 153 EXPECT_TRUE(target_view->dropped()); |
| 154 | 154 |
| 155 source->Close(); | 155 source->Close(); |
| 156 target->Close(); | 156 target->Close(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace ash | 159 } // namespace ash |
| OLD | NEW |