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

Side by Side Diff: trunk/src/ash/drag_drop/drag_drop_tracker_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_tracker.h" 5 #include "ash/drag_drop/drag_drop_tracker.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // TODO(mazda): Remove this once ash/wm/coordinate_conversion.h supports 55 // TODO(mazda): Remove this once ash/wm/coordinate_conversion.h supports
56 // non-X11 platforms. 56 // non-X11 platforms.
57 #if defined(USE_X11) 57 #if defined(USE_X11)
58 #define MAYBE_GetTarget GetTarget 58 #define MAYBE_GetTarget GetTarget
59 #else 59 #else
60 #define MAYBE_GetTarget DISABLED_GetTarget 60 #define MAYBE_GetTarget DISABLED_GetTarget
61 #endif 61 #endif
62 62
63 TEST_F(DragDropTrackerTest, MAYBE_GetTarget) { 63 TEST_F(DragDropTrackerTest, MAYBE_GetTarget) {
64 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 64 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
65 EXPECT_EQ(2U, root_windows.size()); 65 EXPECT_EQ(2U, root_windows.size());
66 66
67 scoped_ptr<aura::Window> window0( 67 scoped_ptr<aura::Window> window0(
68 CreateTestWindow(gfx::Rect(0, 0, 100, 100))); 68 CreateTestWindow(gfx::Rect(0, 0, 100, 100)));
69 window0->Show(); 69 window0->Show();
70 70
71 scoped_ptr<aura::Window> window1( 71 scoped_ptr<aura::Window> window1(
72 CreateTestWindow(gfx::Rect(300, 100, 100, 100))); 72 CreateTestWindow(gfx::Rect(300, 100, 100, 100)));
73 window1->Show(); 73 window1->Show();
74 EXPECT_EQ(root_windows[0], window0->GetRootWindow()); 74 EXPECT_EQ(root_windows[0], window0->GetRootWindow());
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 // TODO(mazda): Remove this once ash/wm/coordinate_conversion.h supports 122 // TODO(mazda): Remove this once ash/wm/coordinate_conversion.h supports
123 // non-X11 platforms. 123 // non-X11 platforms.
124 #if defined(USE_X11) 124 #if defined(USE_X11)
125 #define MAYBE_ConvertEvent ConvertEvent 125 #define MAYBE_ConvertEvent ConvertEvent
126 #else 126 #else
127 #define MAYBE_ConvertEvent DISABLED_ConvertEvent 127 #define MAYBE_ConvertEvent DISABLED_ConvertEvent
128 #endif 128 #endif
129 129
130 TEST_F(DragDropTrackerTest, MAYBE_ConvertEvent) { 130 TEST_F(DragDropTrackerTest, MAYBE_ConvertEvent) {
131 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 131 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
132 EXPECT_EQ(2U, root_windows.size()); 132 EXPECT_EQ(2U, root_windows.size());
133 133
134 scoped_ptr<aura::Window> window0( 134 scoped_ptr<aura::Window> window0(
135 CreateTestWindow(gfx::Rect(0, 0, 100, 100))); 135 CreateTestWindow(gfx::Rect(0, 0, 100, 100)));
136 window0->Show(); 136 window0->Show();
137 137
138 scoped_ptr<aura::Window> window1( 138 scoped_ptr<aura::Window> window1(
139 CreateTestWindow(gfx::Rect(300, 100, 100, 100))); 139 CreateTestWindow(gfx::Rect(300, 100, 100, 100)));
140 window1->Show(); 140 window1->Show();
141 141
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 scoped_ptr<ui::LocatedEvent> converted11(ConvertEvent(window1.get(), 193 scoped_ptr<ui::LocatedEvent> converted11(ConvertEvent(window1.get(),
194 original11)); 194 original11));
195 EXPECT_EQ(original11.type(), converted11->type()); 195 EXPECT_EQ(original11.type(), converted11->type());
196 EXPECT_EQ("50,50", converted11->location().ToString()); 196 EXPECT_EQ("50,50", converted11->location().ToString());
197 EXPECT_EQ("150,150", converted11->root_location().ToString()); 197 EXPECT_EQ("150,150", converted11->root_location().ToString());
198 EXPECT_EQ(original11.flags(), converted11->flags()); 198 EXPECT_EQ(original11.flags(), converted11->flags());
199 } 199 }
200 200
201 } // namespace test 201 } // namespace test
202 } // namespace aura 202 } // namespace aura
OLDNEW
« no previous file with comments | « trunk/src/ash/drag_drop/drag_drop_interactive_uitest.cc ('k') | trunk/src/ash/extended_desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698