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

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

Issue 2165693002: Fix tests in when MD is set to EXPERIMENTAL by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 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 | « no previous file | ash/test/ash_md_test_base.h » ('j') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ed2a88292c4e299ebab434ddc46302570618006d..9a3ce6371f7b86756fa7f049162ed68147465c24 100644
--- a/ash/system/toast/toast_manager_unittest.cc
+++ b/ash/system/toast/toast_manager_unittest.cc
@@ -223,6 +223,7 @@ TEST_F(ToastManagerTest, PositionWithVisibleLeftShelf) {
EXPECT_EQ(1, GetToastSerial());
gfx::Rect toast_bounds = GetCurrentWidget()->GetWindowBoundsInScreen();
+ gfx::RectF precise_toast_bounds(toast_bounds);
gfx::Rect root_bounds =
ScreenUtil::GetShelfDisplayBoundsInRoot(Shell::GetPrimaryRootWindow());
@@ -234,9 +235,9 @@ TEST_F(ToastManagerTest, PositionWithVisibleLeftShelf) {
// doesn't return correct value.
gfx::Rect shelf_bounds = shelf->GetIdealBounds();
EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds));
- EXPECT_EQ(
- shelf_bounds.right() + (root_bounds.width() - shelf_bounds.width()) / 2,
- toast_bounds.CenterPoint().x());
+ EXPECT_EQ(round(shelf_bounds.right() +
+ (root_bounds.width() - shelf_bounds.width()) / 2.0),
+ round(precise_toast_bounds.CenterPoint().x()));
}
}
« no previous file with comments | « no previous file | ash/test/ash_md_test_base.h » ('j') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698