| Index: ui/aura/window_unittest.cc
|
| ===================================================================
|
| --- ui/aura/window_unittest.cc (revision 104542)
|
| +++ ui/aura/window_unittest.cc (working copy)
|
| @@ -10,6 +10,7 @@
|
| #include "ui/aura/event.h"
|
| #include "ui/aura/focus_manager.h"
|
| #include "ui/aura/root_window.h"
|
| +#include "ui/aura/test_desktop_delegate.h"
|
| #include "ui/aura/window_delegate.h"
|
| #include "ui/gfx/canvas_skia.h"
|
| #include "ui/gfx/compositor/layer.h"
|
| @@ -177,8 +178,6 @@
|
| WindowTest() : main_message_loop(MessageLoop::TYPE_UI) {
|
| Desktop::GetInstance()->Show();
|
| Desktop::GetInstance()->SetSize(gfx::Size(500, 500));
|
| - if (!Desktop::GetInstance()->default_parent())
|
| - Desktop::GetInstance()->CreateDefaultParentForTesting();
|
| }
|
| virtual ~WindowTest() {}
|
|
|
| @@ -214,8 +213,14 @@
|
| return window;
|
| }
|
|
|
| + protected:
|
| + Window* toplevel_container() {
|
| + return desktop_delegate_.default_container();
|
| + }
|
| +
|
| private:
|
| MessageLoop main_message_loop;
|
| + TestDesktopDelegate desktop_delegate_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(WindowTest);
|
| };
|
| @@ -266,7 +271,7 @@
|
| CreateTestWindow(SK_ColorGRAY, 13, gfx::Rect(5, 470, 50, 50), w1.get()));
|
|
|
| Window* desktop = Desktop::GetInstance()->window();
|
| - Desktop::GetInstance()->default_parent()->SetBounds(gfx::Rect(500, 500));
|
| + toplevel_container()->SetBounds(gfx::Rect(500, 500));
|
| EXPECT_EQ(NULL, desktop->GetEventHandlerForPoint(gfx::Point(5, 5)));
|
| EXPECT_EQ(w1.get(), desktop->GetEventHandlerForPoint(gfx::Point(11, 11)));
|
| EXPECT_EQ(w11.get(), desktop->GetEventHandlerForPoint(gfx::Point(16, 16)));
|
|
|