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

Unified Diff: ash/drag_drop/drag_drop_tracker_unittest.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/drag_drop/drag_drop_tracker.cc ('k') | ash/focus_cycler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/drag_drop/drag_drop_tracker_unittest.cc
diff --git a/ash/drag_drop/drag_drop_tracker_unittest.cc b/ash/drag_drop/drag_drop_tracker_unittest.cc
index 279e17eda4f158135e20fd0b6fe0b72b5a35ea7b..d8a1f10640898eeeaaed2c35ff39f32fbc4c5df0 100644
--- a/ash/drag_drop/drag_drop_tracker_unittest.cc
+++ b/ash/drag_drop/drag_drop_tracker_unittest.cc
@@ -22,19 +22,17 @@ class DragDropTrackerTest : public test::AshTestBase {
UpdateDisplay("200x200,200x200");
}
- static aura::Window* CreateTestWindow(const gfx::Rect& bounds,
- aura::Window* parent) {
+ aura::Window* CreateTestWindow(const gfx::Rect& bounds) {
static int window_id = 0;
- return aura::test::CreateTestWindowWithDelegate(
+ return CreateTestWindowInShellWithDelegate(
aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(),
window_id++,
- bounds,
- parent);
+ bounds);
}
static aura::Window* GetTarget(const gfx::Point& location) {
scoped_ptr<internal::DragDropTracker> tracker(
- new internal::DragDropTracker);
+ new internal::DragDropTracker(Shell::GetPrimaryRootWindow()));
ui::MouseEvent e(ui::ET_MOUSE_DRAGGED,
location,
location,
@@ -46,7 +44,7 @@ class DragDropTrackerTest : public test::AshTestBase {
static ui::LocatedEvent* ConvertEvent(aura::Window* target,
const ui::MouseEvent& event) {
scoped_ptr<internal::DragDropTracker> tracker(
- new internal::DragDropTracker);
+ new internal::DragDropTracker(Shell::GetPrimaryRootWindow()));
ui::LocatedEvent* converted = tracker->ConvertEvent(target, event);
return converted;
}
@@ -67,13 +65,13 @@ TEST_F(DragDropTrackerTest, MAYBE_GetTarget) {
Shell::GetInstance()->set_active_root_window(root_windows[0]);
scoped_ptr<aura::Window> window0(
- CreateTestWindow(gfx::Rect(0, 0, 100, 100), NULL));
+ CreateTestWindow(gfx::Rect(0, 0, 100, 100)));
window0->Show();
Shell::GetInstance()->set_active_root_window(root_windows[1]);
scoped_ptr<aura::Window> window1(
- CreateTestWindow(gfx::Rect(100, 100, 100, 100), NULL));
+ CreateTestWindow(gfx::Rect(100, 100, 100, 100)));
window1->Show();
// Make RootWindow0 active so that capture window is parented to it.
@@ -133,12 +131,12 @@ TEST_F(DragDropTrackerTest, MAYBE_ConvertEvent) {
Shell::GetInstance()->set_active_root_window(root_windows[0]);
scoped_ptr<aura::Window> window0(
- CreateTestWindow(gfx::Rect(0, 0, 100, 100), NULL));
+ CreateTestWindow(gfx::Rect(0, 0, 100, 100)));
window0->Show();
Shell::GetInstance()->set_active_root_window(root_windows[1]);
scoped_ptr<aura::Window> window1(
- CreateTestWindow(gfx::Rect(100, 100, 100, 100), NULL));
+ CreateTestWindow(gfx::Rect(100, 100, 100, 100)));
window1->Show();
// Make RootWindow0 active so that capture window is parented to it.
« no previous file with comments | « ash/drag_drop/drag_drop_tracker.cc ('k') | ash/focus_cycler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698