Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: trunk/src/ash/drag_drop/drag_drop_interactive_uitest.cc

Issue 59153004: Revert 233787 "Eliminate Shell::RootWindowList in favor of aura:..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_test_base.h" 8 #include "ash/test/ash_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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #define MAYBE_DragDropAcrossMultiDisplay DragDropAcrossMultiDisplay 126 #define MAYBE_DragDropAcrossMultiDisplay DragDropAcrossMultiDisplay
127 #endif 127 #endif
128 128
129 // Test if the mouse gets moved properly to another display 129 // Test if the mouse gets moved properly to another display
130 // during drag & drop operation. 130 // during drag & drop operation.
131 TEST_F(DragDropTest, MAYBE_DragDropAcrossMultiDisplay) { 131 TEST_F(DragDropTest, MAYBE_DragDropAcrossMultiDisplay) {
132 if (!SupportsMultipleDisplays()) 132 if (!SupportsMultipleDisplays())
133 return; 133 return;
134 134
135 UpdateDisplay("400x400,400x400"); 135 UpdateDisplay("400x400,400x400");
136 aura::Window::Windows root_windows = 136 Shell::RootWindowList root_windows =
137 Shell::GetInstance()->GetAllRootWindows(); 137 Shell::GetInstance()->GetAllRootWindows();
138 views::View* draggable_view = new DraggableView(); 138 views::View* draggable_view = new DraggableView();
139 draggable_view->set_drag_controller(NULL); 139 draggable_view->set_drag_controller(NULL);
140 draggable_view->SetBounds(0, 0, 100, 100); 140 draggable_view->SetBounds(0, 0, 100, 100);
141 views::Widget* source = 141 views::Widget* source =
142 CreateWidget(draggable_view, gfx::Rect(0, 0, 100, 100)); 142 CreateWidget(draggable_view, gfx::Rect(0, 0, 100, 100));
143 143
144 TargetView* target_view = new TargetView(); 144 TargetView* target_view = new TargetView();
145 target_view->SetBounds(0, 0, 100, 100); 145 target_view->SetBounds(0, 0, 100, 100);
146 views::Widget* target = 146 views::Widget* target =
147 CreateWidget(target_view, gfx::Rect(400, 0, 100, 100)); 147 CreateWidget(target_view, gfx::Rect(400, 0, 100, 100));
148 148
149 // Make sure they're on the different root windows. 149 // Make sure they're on the different root windows.
150 EXPECT_EQ(root_windows[0], source->GetNativeView()->GetRootWindow()); 150 EXPECT_EQ(root_windows[0], source->GetNativeView()->GetRootWindow());
151 EXPECT_EQ(root_windows[1], target->GetNativeView()->GetRootWindow()); 151 EXPECT_EQ(root_windows[1], target->GetNativeView()->GetRootWindow());
152 152
153 ui_controls::SendMouseMoveNotifyWhenDone( 153 ui_controls::SendMouseMoveNotifyWhenDone(
154 10, 10, base::Bind(&DragDropAcrossMultiDisplay_Step1)); 154 10, 10, base::Bind(&DragDropAcrossMultiDisplay_Step1));
155 155
156 base::MessageLoop::current()->Run(); 156 base::MessageLoop::current()->Run();
157 157
158 EXPECT_TRUE(target_view->dropped()); 158 EXPECT_TRUE(target_view->dropped());
159 159
160 source->Close(); 160 source->Close();
161 target->Close(); 161 target->Close();
162 } 162 }
163 163
164 } // namespace internal 164 } // namespace internal
165 } // namespace ash 165 } // namespace ash
OLDNEW
« no previous file with comments | « trunk/src/ash/drag_drop/drag_drop_controller_unittest.cc ('k') | trunk/src/ash/drag_drop/drag_drop_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698