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

Unified Diff: ash/wm/window_manager_unittest.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: I think the content_unittests timeout on linux_aura is flake, but try to fix it anyway. 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
Index: ash/wm/window_manager_unittest.cc
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index 5b02d35efee70b706321a2bd687afbfcd0ae35b8..454b8a869cdd0fc67ad9309ce45c150b7f8ea7a2 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -119,8 +119,8 @@ TEST_F(WindowManagerTest, Focus) {
// Supplied ids are negative so as not to collide with shell ids.
// TODO(beng): maybe introduce a MAKE_SHELL_ID() macro that generates a safe
// id beyond shell id max?
- scoped_ptr<aura::Window> w1(aura::test::CreateTestWindow(
- SK_ColorWHITE, -1, gfx::Rect(10, 10, 500, 500), NULL));
+ scoped_ptr<aura::Window> w1(CreateTestWindowInShell(
+ SK_ColorWHITE, -1, gfx::Rect(10, 10, 500, 500)));
scoped_ptr<aura::Window> w11(aura::test::CreateTestWindow(
SK_ColorGREEN, -11, gfx::Rect(5, 5, 100, 100), w1.get()));
scoped_ptr<aura::Window> w111(aura::test::CreateTestWindow(
@@ -219,12 +219,12 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
test::TestActivationDelegate d1;
aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> w1(aura::test::CreateTestWindowWithDelegate(
- &wd, -1, gfx::Rect(10, 10, 50, 50), NULL));
+ scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(
+ &wd, -1, gfx::Rect(10, 10, 50, 50)));
d1.SetWindow(w1.get());
test::TestActivationDelegate d2;
- scoped_ptr<aura::Window> w2(aura::test::CreateTestWindowWithDelegate(
- &wd, -1, gfx::Rect(70, 70, 50, 50), NULL));
+ scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
+ &wd, -1, gfx::Rect(70, 70, 50, 50)));
d2.SetWindow(w2.get());
aura::FocusManager* focus_manager = w1->GetFocusManager();
@@ -314,8 +314,8 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
scoped_ptr<aura::Window> w11(CreateTestWindowWithDelegate(
&nfd, -1, gfx::Rect(10, 10, 10, 10), w1.get()));
// Move focus to |w2| first.
- scoped_ptr<aura::Window> w2(aura::test::CreateTestWindowWithDelegate(
- &wd, -1, gfx::Rect(70, 70, 50, 50), NULL));
+ scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
+ &wd, -1, gfx::Rect(70, 70, 50, 50)));
aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
w2.get());
generator.ClickLeftButton();
@@ -335,12 +335,12 @@ TEST_F(WindowManagerTest, ActivateOnTouch) {
test::TestActivationDelegate d1;
aura::test::TestWindowDelegate wd;
- scoped_ptr<aura::Window> w1(aura::test::CreateTestWindowWithDelegate(
- &wd, -1, gfx::Rect(10, 10, 50, 50), NULL));
+ scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(
+ &wd, -1, gfx::Rect(10, 10, 50, 50)));
d1.SetWindow(w1.get());
test::TestActivationDelegate d2;
- scoped_ptr<aura::Window> w2(aura::test::CreateTestWindowWithDelegate(
- &wd, -2, gfx::Rect(70, 70, 50, 50), NULL));
+ scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
+ &wd, -2, gfx::Rect(70, 70, 50, 50)));
d2.SetWindow(w2.get());
aura::FocusManager* focus_manager = w1->GetFocusManager();
@@ -407,11 +407,10 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
const int kWindowLeft = 123;
const int kWindowTop = 45;
HitTestWindowDelegate window_delegate;
- scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithDelegate(
+ scoped_ptr<aura::Window> window(CreateTestWindowInShellWithDelegate(
&window_delegate,
-1,
- gfx::Rect(kWindowLeft, kWindowTop, 640, 480),
- NULL));
+ gfx::Rect(kWindowLeft, kWindowTop, 640, 480)));
// Create two mouse movement events we can switch between.
gfx::Point point1(kWindowLeft, kWindowTop);
@@ -514,7 +513,7 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
test::TestActivationDelegate d1;
aura::test::TestWindowDelegate wd;
scoped_ptr<aura::Window> w1(
- CreateTestWindowWithDelegate(&wd, 1, gfx::Rect(0, 10, 50, 50), NULL));
+ CreateTestWindowInShellWithDelegate(&wd, 1, gfx::Rect(0, 10, 50, 50)));
d1.SetWindow(w1.get());
w1->Show();
@@ -553,8 +552,8 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
// Creates a window and make it active
- scoped_ptr<aura::Window> w1(aura::test::CreateTestWindow(
- SK_ColorWHITE, -1, gfx::Rect(0, 0, 100, 100), NULL));
+ scoped_ptr<aura::Window> w1(CreateTestWindowInShell(
+ SK_ColorWHITE, -1, gfx::Rect(0, 0, 100, 100)));
wm::ActivateWindow(w1.get());
// Creates two addition filters
@@ -623,8 +622,8 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
TEST_F(WindowManagerTest, UpdateCursorVisibility) {
aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
root_window->SetBounds(gfx::Rect(0, 0, 500, 500));
- scoped_ptr<aura::Window> window(aura::test::CreateTestWindow(
- SK_ColorWHITE, -1, gfx::Rect(0, 0, 500, 500), NULL));
+ scoped_ptr<aura::Window> window(CreateTestWindowInShell(
+ SK_ColorWHITE, -1, gfx::Rect(0, 0, 500, 500)));
ash::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();

Powered by Google App Engine
This is Rietveld 408576698