| Index: ash/system/toast/toast_manager_unittest.cc
|
| diff --git a/ash/system/toast/toast_manager_unittest.cc b/ash/system/toast/toast_manager_unittest.cc
|
| index 7c79707db9859d97ebd80bc6c4d76b3a899e1142..102766a94ffdfb269f767c9960449ec035b45b86 100644
|
| --- a/ash/system/toast/toast_manager_unittest.cc
|
| +++ b/ash/system/toast/toast_manager_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include "ash/common/shelf/shelf_constants.h"
|
| #include "ash/common/shelf/wm_shelf.h"
|
| #include "ash/common/system/toast/toast_manager.h"
|
| +#include "ash/common/wm/wm_screen_util.h"
|
| #include "ash/common/wm_shell.h"
|
| #include "ash/display/display_manager.h"
|
| #include "ash/screen_util.h"
|
| @@ -162,7 +163,7 @@ TEST_F(ToastManagerTest, PositionWithVisibleBottomShelf) {
|
|
|
| gfx::Rect toast_bounds = GetCurrentWidget()->GetWindowBoundsInScreen();
|
| gfx::Rect root_bounds =
|
| - ScreenUtil::GetShelfDisplayBoundsInRoot(Shell::GetPrimaryRootWindow());
|
| + wm::GetShelfDisplayBoundsForWindow(shelf->GetWindow());
|
|
|
| EXPECT_TRUE(toast_bounds.Intersects(shelf->GetUserWorkAreaBounds()));
|
| EXPECT_NEAR(root_bounds.CenterPoint().x(), toast_bounds.CenterPoint().x(), 1);
|
| @@ -192,7 +193,7 @@ TEST_F(ToastManagerTest, PositionWithAutoHiddenBottomShelf) {
|
|
|
| gfx::Rect toast_bounds = GetCurrentWidget()->GetWindowBoundsInScreen();
|
| gfx::Rect root_bounds =
|
| - ScreenUtil::GetShelfDisplayBoundsInRoot(Shell::GetPrimaryRootWindow());
|
| + wm::GetShelfDisplayBoundsForWindow(shelf->GetWindow());
|
|
|
| EXPECT_TRUE(toast_bounds.Intersects(shelf->GetUserWorkAreaBounds()));
|
| EXPECT_NEAR(root_bounds.CenterPoint().x(), toast_bounds.CenterPoint().x(), 1);
|
| @@ -211,7 +212,7 @@ TEST_F(ToastManagerTest, PositionWithHiddenBottomShelf) {
|
|
|
| gfx::Rect toast_bounds = GetCurrentWidget()->GetWindowBoundsInScreen();
|
| gfx::Rect root_bounds =
|
| - ScreenUtil::GetShelfDisplayBoundsInRoot(Shell::GetPrimaryRootWindow());
|
| + wm::GetShelfDisplayBoundsForWindow(shelf->GetWindow());
|
|
|
| EXPECT_TRUE(toast_bounds.Intersects(shelf->GetUserWorkAreaBounds()));
|
| EXPECT_NEAR(root_bounds.CenterPoint().x(), toast_bounds.CenterPoint().x(), 1);
|
| @@ -229,7 +230,7 @@ TEST_F(ToastManagerTest, PositionWithVisibleLeftShelf) {
|
| gfx::Rect toast_bounds = GetCurrentWidget()->GetWindowBoundsInScreen();
|
| gfx::RectF precise_toast_bounds(toast_bounds);
|
| gfx::Rect root_bounds =
|
| - ScreenUtil::GetShelfDisplayBoundsInRoot(Shell::GetPrimaryRootWindow());
|
| + wm::GetShelfDisplayBoundsForWindow(shelf->GetWindow());
|
|
|
| EXPECT_TRUE(toast_bounds.Intersects(shelf->GetUserWorkAreaBounds()));
|
| EXPECT_EQ(root_bounds.bottom() - 5, toast_bounds.bottom());
|
| @@ -262,7 +263,7 @@ TEST_F(ToastManagerTest, PositionWithUnifiedDesktop) {
|
|
|
| gfx::Rect toast_bounds = GetCurrentWidget()->GetWindowBoundsInScreen();
|
| gfx::Rect root_bounds =
|
| - ScreenUtil::GetShelfDisplayBoundsInRoot(Shell::GetPrimaryRootWindow());
|
| + wm::GetShelfDisplayBoundsForWindow(shelf->GetWindow());
|
|
|
| EXPECT_TRUE(toast_bounds.Intersects(shelf->GetUserWorkAreaBounds()));
|
| EXPECT_TRUE(root_bounds.Contains(toast_bounds));
|
|
|