Index: ash/wm/workspace/workspace_window_resizer_unittest.cc |
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc |
index 67f29fb2fb1c290940c0a9dc4c69c1270027e64d..d6f366e4ad2cc6d408794745dde97911d4a805ce 100644 |
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc |
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc |
@@ -485,7 +485,8 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) { |
ASSERT_EQ(2U, root_windows.size()); |
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), |
- gfx::Screen::GetPrimaryDisplay()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView())); |
EXPECT_EQ(root_windows[0], window_->GetRootWindow()); |
{ |
// Grab (0, 0) of the window. |
@@ -503,7 +504,8 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) { |
} |
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), |
- gfx::Screen::GetPrimaryDisplay()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView())); |
EXPECT_EQ(root_windows[0], window_->GetRootWindow()); |
{ |
// Grab (0, 0) of the window and move the pointer to (790, 10). |
@@ -519,7 +521,8 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) { |
} |
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), |
- gfx::Screen::GetPrimaryDisplay()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView())); |
EXPECT_EQ(root_windows[0], window_->GetRootWindow()); |
{ |
// Grab the top-right edge of the window and move the pointer to (0, 10) |
@@ -569,7 +572,8 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_PhantomStyle) { |
ASSERT_EQ(2U, root_windows.size()); |
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), |
- gfx::Screen::GetPrimaryDisplay()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView())); |
EXPECT_EQ(root_windows[0], window_->GetRootWindow()); |
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity()); |
{ |
@@ -620,7 +624,8 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_PhantomStyle) { |
// Do the same test with RevertDrag(). |
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), |
- gfx::Screen::GetPrimaryDisplay()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView())); |
EXPECT_EQ(root_windows[0], window_->GetRootWindow()); |
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity()); |
{ |
@@ -644,7 +649,8 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_CancelSnapPhantom) { |
ASSERT_EQ(2U, root_windows.size()); |
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), |
- gfx::Screen::GetPrimaryDisplay()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView())); |
EXPECT_EQ(root_windows[0], window_->GetRootWindow()); |
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity()); |
{ |
@@ -768,7 +774,7 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) { |
Shell::GetInstance()->SetDisplayWorkAreaInsets( |
Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 10, 0)); |
- ASSERT_EQ(1, gfx::Screen::GetNumDisplays()); |
+ ASSERT_EQ(1, gfx::Screen::GetNumDisplays(ash::Shell::GetRootNativeView())); |
window_->SetBounds(gfx::Rect(100, 200, 300, 400)); |
scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( |
@@ -784,7 +790,7 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) { |
// Makes sure we don't allow dragging on the work area with multidisplay. |
TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) { |
UpdateDisplay("800x600,800x600"); |
- ASSERT_EQ(2, gfx::Screen::GetNumDisplays()); |
+ ASSERT_EQ(2, gfx::Screen::GetNumDisplays(ash::Shell::GetRootNativeView())); |
Shell::GetInstance()->SetDisplayWorkAreaInsets( |
Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 10, 0)); |