Index: ui/views/corewm/shadow_controller_unittest.cc |
diff --git a/ui/views/corewm/shadow_controller_unittest.cc b/ui/views/corewm/shadow_controller_unittest.cc |
index acfb324c1b00620c15404a50b5db60cf73e0f2e7..4140f7d83fb5bd38da9780a14f99bc1f2a3e7f0a 100644 |
--- a/ui/views/corewm/shadow_controller_unittest.cc |
+++ b/ui/views/corewm/shadow_controller_unittest.cc |
@@ -9,6 +9,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "ui/aura/client/activation_client.h" |
+#include "ui/aura/client/window_tree_client.h" |
#include "ui/aura/root_window.h" |
#include "ui/aura/test/aura_test_base.h" |
#include "ui/aura/window.h" |
@@ -56,7 +57,7 @@ TEST_F(ShadowControllerTest, Shadow) { |
scoped_ptr<aura::Window> window(new aura::Window(NULL)); |
window->SetType(aura::client::WINDOW_TYPE_NORMAL); |
window->Init(ui::LAYER_TEXTURED); |
- SetDefaultParentByPrimaryRootWindow(window.get()); |
+ ParentWindow(window.get()); |
// We should create the shadow before the window is visible (the shadow's |
// layer won't get drawn yet since it's a child of the window's layer). |
@@ -92,7 +93,7 @@ TEST_F(ShadowControllerTest, ShadowBounds) { |
scoped_ptr<aura::Window> window(new aura::Window(NULL)); |
window->SetType(aura::client::WINDOW_TYPE_NORMAL); |
window->Init(ui::LAYER_TEXTURED); |
- SetDefaultParentByPrimaryRootWindow(window.get()); |
+ ParentWindow(window.get()); |
window->Show(); |
const gfx::Rect kOldBounds(20, 30, 400, 300); |
@@ -121,7 +122,7 @@ TEST_F(ShadowControllerTest, ShadowStyle) { |
scoped_ptr<aura::Window> window1(new aura::Window(NULL)); |
window1->SetType(aura::client::WINDOW_TYPE_NORMAL); |
window1->Init(ui::LAYER_TEXTURED); |
- SetDefaultParentByPrimaryRootWindow(window1.get()); |
+ ParentWindow(window1.get()); |
window1->SetBounds(gfx::Rect(10, 20, 300, 400)); |
window1->Show(); |
ActivateWindow(window1.get()); |
@@ -135,7 +136,7 @@ TEST_F(ShadowControllerTest, ShadowStyle) { |
scoped_ptr<aura::Window> window2(new aura::Window(NULL)); |
window2->SetType(aura::client::WINDOW_TYPE_NORMAL); |
window2->Init(ui::LAYER_TEXTURED); |
- SetDefaultParentByPrimaryRootWindow(window2.get()); |
+ ParentWindow(window2.get()); |
window2->SetBounds(gfx::Rect(11, 21, 301, 401)); |
window2->Show(); |
ActivateWindow(window2.get()); |
@@ -154,7 +155,7 @@ TEST_F(ShadowControllerTest, SmallShadowsForTooltipsAndMenus) { |
scoped_ptr<aura::Window> tooltip_window(new aura::Window(NULL)); |
tooltip_window->SetType(aura::client::WINDOW_TYPE_TOOLTIP); |
tooltip_window->Init(ui::LAYER_TEXTURED); |
- SetDefaultParentByPrimaryRootWindow(tooltip_window.get()); |
+ ParentWindow(tooltip_window.get()); |
tooltip_window->SetBounds(gfx::Rect(10, 20, 300, 400)); |
tooltip_window->Show(); |
@@ -165,7 +166,7 @@ TEST_F(ShadowControllerTest, SmallShadowsForTooltipsAndMenus) { |
scoped_ptr<aura::Window> menu_window(new aura::Window(NULL)); |
menu_window->SetType(aura::client::WINDOW_TYPE_MENU); |
menu_window->Init(ui::LAYER_TEXTURED); |
- SetDefaultParentByPrimaryRootWindow(menu_window.get()); |
+ ParentWindow(menu_window.get()); |
menu_window->SetBounds(gfx::Rect(10, 20, 300, 400)); |
menu_window->Show(); |
@@ -182,7 +183,7 @@ TEST_F(ShadowControllerTest, TransientParentKeepsActiveShadow) { |
scoped_ptr<aura::Window> window1(new aura::Window(NULL)); |
window1->SetType(aura::client::WINDOW_TYPE_NORMAL); |
window1->Init(ui::LAYER_TEXTURED); |
- SetDefaultParentByPrimaryRootWindow(window1.get()); |
+ ParentWindow(window1.get()); |
window1->SetBounds(gfx::Rect(10, 20, 300, 400)); |
window1->Show(); |
ActivateWindow(window1.get()); |
@@ -198,7 +199,7 @@ TEST_F(ShadowControllerTest, TransientParentKeepsActiveShadow) { |
scoped_ptr<aura::Window> window2(new aura::Window(NULL)); |
window2->SetType(aura::client::WINDOW_TYPE_NORMAL); |
window2->Init(ui::LAYER_TEXTURED); |
- SetDefaultParentByPrimaryRootWindow(window2.get()); |
+ ParentWindow(window2.get()); |
window2->SetBounds(gfx::Rect(11, 21, 301, 401)); |
window1->AddTransientChild(window2.get()); |
aura::client::SetHideOnDeactivate(window2.get(), true); |