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

Unified Diff: ash/screen_util_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: Restore screen bounds conversion for app list. 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
« no previous file with comments | « ash/screen_util.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/screen_util_unittest.cc
diff --git a/ash/screen_util_unittest.cc b/ash/screen_util_unittest.cc
index 095cabdc02462b1419b3dbe03965e94e6285a1b9..77d33c330a223c1350fc6abbf0ce878174817f46 100644
--- a/ash/screen_util_unittest.cc
+++ b/ash/screen_util_unittest.cc
@@ -4,6 +4,9 @@
#include "ash/screen_util.h"
+#include "ash/common/wm/wm_screen_util.h"
+#include "ash/common/wm_lookup.h"
+#include "ash/common/wm_window.h"
#include "ash/display/display_manager.h"
#include "ash/shell.h"
#include "ash/test/ash_md_test_base.h"
@@ -129,30 +132,23 @@ TEST_P(ScreenUtilTest, ShelfDisplayBoundsInUnifiedDesktop) {
views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
NULL, CurrentContext(), gfx::Rect(10, 10, 100, 100));
+ WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget);
UpdateDisplay("500x400");
- EXPECT_EQ("0,0 500x400",
- ScreenUtil::GetShelfDisplayBoundsInRoot(widget->GetNativeWindow())
- .ToString());
+ EXPECT_EQ("0,0 500x400", wm::GetDisplayBoundsWithShelf(window).ToString());
UpdateDisplay("500x400,600x400");
- EXPECT_EQ("0,0 500x400",
- ScreenUtil::GetShelfDisplayBoundsInRoot(widget->GetNativeWindow())
- .ToString());
+ EXPECT_EQ("0,0 500x400", wm::GetDisplayBoundsWithShelf(window).ToString());
// Move to the 2nd physical display. Shelf's display still should be
// the first.
widget->SetBounds(gfx::Rect(800, 0, 100, 100));
ASSERT_EQ("800,0 100x100", widget->GetWindowBoundsInScreen().ToString());
- EXPECT_EQ("0,0 500x400",
- ScreenUtil::GetShelfDisplayBoundsInRoot(widget->GetNativeWindow())
- .ToString());
+ EXPECT_EQ("0,0 500x400", wm::GetDisplayBoundsWithShelf(window).ToString());
UpdateDisplay("600x500");
- EXPECT_EQ("0,0 600x500",
- ScreenUtil::GetShelfDisplayBoundsInRoot(widget->GetNativeWindow())
- .ToString());
+ EXPECT_EQ("0,0 600x500", wm::GetDisplayBoundsWithShelf(window).ToString());
}
} // namespace test
« no previous file with comments | « ash/screen_util.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698