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

Unified Diff: ash/display/display_manager_unittest.cc

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « no previous file | ash/display/display_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager_unittest.cc
diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc
index 56fe2b130cd352f9c93c64bd98f9ac0d78a5e9b2..40448ffba0545f04eb776ed40491d66d23134ef3 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -870,7 +870,7 @@ TEST_P(DisplayManagerTest, TestNativeDisplaysChangedNoInternal) {
GetDisplayInfoForId(10).bounds_in_native().ToString());
EXPECT_EQ("100x100", ash::Shell::GetPrimaryRootWindow()
->GetHost()
- ->GetBounds()
+ ->GetBoundsInPixels()
.size()
.ToString());
}
@@ -1644,7 +1644,8 @@ TEST_P(DisplayManagerTest, SoftwareMirroring) {
EXPECT_EQ(
"0,0 300x400",
display::Screen::GetScreen()->GetPrimaryDisplay().bounds().ToString());
- EXPECT_EQ("400x500", test_api.GetHost()->GetBounds().size().ToString());
+ EXPECT_EQ("400x500",
+ test_api.GetHost()->GetBoundsInPixels().size().ToString());
EXPECT_EQ("300x400",
test_api.GetHost()->window()->bounds().size().ToString());
EXPECT_TRUE(display_manager()->IsInMirrorMode());
@@ -1896,32 +1897,32 @@ TEST_P(DisplayManagerTest, UpdateDisplayWithHostOrigin) {
aura::WindowTreeHost* host0 = root_windows[0]->GetHost();
aura::WindowTreeHost* host1 = root_windows[1]->GetHost();
- EXPECT_EQ("1,1", host0->GetBounds().origin().ToString());
- EXPECT_EQ("100x200", host0->GetBounds().size().ToString());
+ EXPECT_EQ("1,1", host0->GetBoundsInPixels().origin().ToString());
+ EXPECT_EQ("100x200", host0->GetBoundsInPixels().size().ToString());
// UpdateDisplay set the origin if it's not set.
- EXPECT_NE("1,1", host1->GetBounds().origin().ToString());
- EXPECT_EQ("300x400", host1->GetBounds().size().ToString());
+ EXPECT_NE("1,1", host1->GetBoundsInPixels().origin().ToString());
+ EXPECT_EQ("300x400", host1->GetBoundsInPixels().size().ToString());
UpdateDisplay("100x200,200+300-300x400");
ASSERT_EQ(2, display::Screen::GetScreen()->GetNumDisplays());
- EXPECT_EQ("0,0", host0->GetBounds().origin().ToString());
- EXPECT_EQ("100x200", host0->GetBounds().size().ToString());
- EXPECT_EQ("200,300", host1->GetBounds().origin().ToString());
- EXPECT_EQ("300x400", host1->GetBounds().size().ToString());
+ EXPECT_EQ("0,0", host0->GetBoundsInPixels().origin().ToString());
+ EXPECT_EQ("100x200", host0->GetBoundsInPixels().size().ToString());
+ EXPECT_EQ("200,300", host1->GetBoundsInPixels().origin().ToString());
+ EXPECT_EQ("300x400", host1->GetBoundsInPixels().size().ToString());
UpdateDisplay("400+500-200x300,300x400");
ASSERT_EQ(2, display::Screen::GetScreen()->GetNumDisplays());
- EXPECT_EQ("400,500", host0->GetBounds().origin().ToString());
- EXPECT_EQ("200x300", host0->GetBounds().size().ToString());
- EXPECT_EQ("0,0", host1->GetBounds().origin().ToString());
- EXPECT_EQ("300x400", host1->GetBounds().size().ToString());
+ EXPECT_EQ("400,500", host0->GetBoundsInPixels().origin().ToString());
+ EXPECT_EQ("200x300", host0->GetBoundsInPixels().size().ToString());
+ EXPECT_EQ("0,0", host1->GetBoundsInPixels().origin().ToString());
+ EXPECT_EQ("300x400", host1->GetBoundsInPixels().size().ToString());
UpdateDisplay("100+200-100x200,300+500-200x300");
ASSERT_EQ(2, display::Screen::GetScreen()->GetNumDisplays());
- EXPECT_EQ("100,200", host0->GetBounds().origin().ToString());
- EXPECT_EQ("100x200", host0->GetBounds().size().ToString());
- EXPECT_EQ("300,500", host1->GetBounds().origin().ToString());
- EXPECT_EQ("200x300", host1->GetBounds().size().ToString());
+ EXPECT_EQ("100,200", host0->GetBoundsInPixels().origin().ToString());
+ EXPECT_EQ("100x200", host0->GetBoundsInPixels().size().ToString());
+ EXPECT_EQ("300,500", host1->GetBoundsInPixels().origin().ToString());
+ EXPECT_EQ("200x300", host1->GetBoundsInPixels().size().ToString());
}
#endif // defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | ash/display/display_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698