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

Unified Diff: ash/wm/shelf_layout_manager_unittest.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix other os's Created 8 years, 2 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/wm/shelf_layout_manager_unittest.cc
diff --git a/ash/wm/shelf_layout_manager_unittest.cc b/ash/wm/shelf_layout_manager_unittest.cc
index 4428c5d548973b09668fe80be503a71f87265b61..883e622b5b390e72b8c44245513d421d2d6f3942 100644
--- a/ash/wm/shelf_layout_manager_unittest.cc
+++ b/ash/wm/shelf_layout_manager_unittest.cc
@@ -218,9 +218,11 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
// Make sure the bounds of the two widgets changed.
EXPECT_GE(shelf->launcher_widget()->GetNativeView()->bounds().y(),
- gfx::Screen::GetPrimaryDisplay().bounds().bottom());
+ gfx::Screen::GetPrimaryDisplay(
+ ash::Shell::GetRootNativeView()).bounds().bottom());
EXPECT_GE(shelf->status()->GetNativeView()->bounds().y(),
- gfx::Screen::GetPrimaryDisplay().bounds().bottom());
+ gfx::Screen::GetPrimaryDisplay(
+ ash::Shell::GetRootNativeView()).bounds().bottom());
// And show it again.
SetState(shelf, ShelfLayoutManager::VISIBLE);
@@ -233,8 +235,8 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
// Make sure the bounds of the two widgets changed.
launcher_bounds = shelf->launcher_widget()->GetNativeView()->bounds();
- int bottom = gfx::Screen::GetPrimaryDisplay().bounds().bottom() -
- shelf_height;
+ int bottom = gfx::Screen::GetPrimaryDisplay(
+ ash::Shell::GetRootNativeView()).bounds().bottom() - shelf_height;
EXPECT_EQ(launcher_bounds.y(),
bottom + (shelf->GetIdealBounds().height() -
launcher_bounds.height()) / 2);
@@ -263,9 +265,11 @@ TEST_F(ShelfLayoutManagerTest, LayoutShelfWhileAnimating) {
// Make sure the bounds of the two widgets changed.
EXPECT_GE(shelf->launcher_widget()->GetNativeView()->bounds().y(),
- gfx::Screen::GetPrimaryDisplay().bounds().bottom());
+ gfx::Screen::GetPrimaryDisplay(
+ ash::Shell::GetRootNativeView()).bounds().bottom());
EXPECT_GE(shelf->status()->GetNativeView()->bounds().y(),
- gfx::Screen::GetPrimaryDisplay().bounds().bottom());
+ gfx::Screen::GetPrimaryDisplay(
+ ash::Shell::GetRootNativeView()).bounds().bottom());
}
// Makes sure the launcher is initially sized correctly.

Powered by Google App Engine
This is Rietveld 408576698