Index: athena/wm/window_list_provider_impl_unittest.cc |
diff --git a/athena/wm/window_list_provider_impl_unittest.cc b/athena/wm/window_list_provider_impl_unittest.cc |
index d3dd2859b26752d283f544a6bc9bc259f9d4e869..5b03d2d4b230255d292f9e12ad730f881495b68a 100644 |
--- a/athena/wm/window_list_provider_impl_unittest.cc |
+++ b/athena/wm/window_list_provider_impl_unittest.cc |
@@ -8,7 +8,6 @@ |
#include "athena/screen/public/screen_manager.h" |
#include "athena/test/base/athena_test_base.h" |
-#include "athena/test/base/test_windows.h" |
#include "athena/wm/public/window_list_provider_observer.h" |
#include "athena/wm/public/window_manager.h" |
#include "ui/aura/client/window_tree_client.h" |
@@ -34,6 +33,18 @@ |
window->Init(aura::WINDOW_LAYER_SOLID_COLOR); |
if (parent) |
parent->AddChild(window.get()); |
+ return window.Pass(); |
+} |
+ |
+scoped_ptr<aura::Window> CreateTransientWindow(aura::Window* transient_parent, |
+ aura::WindowDelegate* delegate, |
+ ui::wm::WindowType window_type) { |
+ scoped_ptr<aura::Window> window(new aura::Window(delegate)); |
+ window->SetType(window_type); |
+ window->Init(aura::WINDOW_LAYER_SOLID_COLOR); |
+ wm::AddTransientChild(transient_parent, window.get()); |
+ aura::client::ParentWindowWithContext( |
+ window.get(), ScreenManager::Get()->GetContext(), gfx::Rect()); |
return window.Pass(); |
} |
@@ -105,8 +116,8 @@ |
scoped_ptr<WindowListProvider> list_provider( |
new WindowListProviderImpl(container.get())); |
- scoped_ptr<aura::Window> first = test::CreateWindowWithType( |
- &delegate, container.get(), ui::wm::WINDOW_TYPE_NORMAL); |
+ scoped_ptr<aura::Window> first = |
+ CreateWindow(container.get(), &delegate, ui::wm::WINDOW_TYPE_NORMAL); |
scoped_ptr<aura::Window> second = |
CreateWindow(container.get(), &delegate, ui::wm::WINDOW_TYPE_NORMAL); |
scoped_ptr<aura::Window> third = |
@@ -296,12 +307,12 @@ |
scoped_ptr<WindowListObserver> observer( |
new WindowListObserver(list_provider)); |
- scoped_ptr<aura::Window> w1 = test::CreateNormalWindow(&delegate, NULL); |
+ scoped_ptr<aura::Window> w1 = CreateTestWindow(&delegate, gfx::Rect()); |
w1->Show(); |
- scoped_ptr<aura::Window> w2 = test::CreateNormalWindow(&delegate, NULL); |
+ scoped_ptr<aura::Window> w2 = CreateTestWindow(&delegate, gfx::Rect()); |
w2->Show(); |
- scoped_ptr<aura::Window> t1 = test::CreateTransientWindow( |
- &delegate, w1.get(), ui::MODAL_TYPE_NONE, false); |
+ scoped_ptr<aura::Window> t1 = |
+ CreateTransientWindow(w1.get(), &delegate, ui::wm::WINDOW_TYPE_NORMAL); |
t1->Show(); |
EXPECT_EQ(2u, list_provider->GetWindowList().size()); |