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

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: 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/screen_util_unittest.cc
diff --git a/ash/screen_util_unittest.cc b/ash/screen_util_unittest.cc
index 095cabdc02462b1419b3dbe03965e94e6285a1b9..84d871d75560358d36281bd06568c3bdc4e4aa67 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,16 +132,15 @@ 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());
+ wm::GetShelfDisplayBoundsForWindow(window).ToString());
UpdateDisplay("500x400,600x400");
EXPECT_EQ("0,0 500x400",
- ScreenUtil::GetShelfDisplayBoundsInRoot(widget->GetNativeWindow())
- .ToString());
+ wm::GetShelfDisplayBoundsForWindow(window).ToString());
// Move to the 2nd physical display. Shelf's display still should be
// the first.
@@ -146,13 +148,11 @@ TEST_P(ScreenUtilTest, ShelfDisplayBoundsInUnifiedDesktop) {
ASSERT_EQ("800,0 100x100", widget->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("0,0 500x400",
- ScreenUtil::GetShelfDisplayBoundsInRoot(widget->GetNativeWindow())
- .ToString());
+ wm::GetShelfDisplayBoundsForWindow(window).ToString());
UpdateDisplay("600x500");
EXPECT_EQ("0,0 600x500",
- ScreenUtil::GetShelfDisplayBoundsInRoot(widget->GetNativeWindow())
- .ToString());
+ wm::GetShelfDisplayBoundsForWindow(window).ToString());
}
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698