Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(877)

Unified Diff: ash/system/toast/toast_manager_unittest.cc

Issue 2215223004: mash: Migrate ShelfLayoutManager ScreenUtil usage to ash common types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));

Powered by Google App Engine
This is Rietveld 408576698