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

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

Issue 2370913002: Removes AshTestBase::SupportsHostWindowResize (Closed)
Patch Set: missed Created 4 years, 3 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/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 1d22db8c2d752b8aa5b41469b9d7379c34aa2607..3891edf8e0029cbbef10fd893620eb11661ebff1 100644
--- a/ash/system/toast/toast_manager_unittest.cc
+++ b/ash/system/toast/toast_manager_unittest.cc
@@ -171,15 +171,13 @@ TEST_F(ToastManagerTest, PositionWithVisibleBottomShelf) {
EXPECT_TRUE(toast_bounds.Intersects(shelf->GetUserWorkAreaBounds()));
EXPECT_NEAR(root_bounds.CenterPoint().x(), toast_bounds.CenterPoint().x(), 1);
- if (SupportsHostWindowResize()) {
- // If host resize is not supported, ShelfLayoutManager::GetIdealBounds()
- // doesn't return correct value.
- gfx::Rect shelf_bounds = shelf->GetIdealBounds();
- EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds));
- EXPECT_EQ(shelf_bounds.y() - 5, toast_bounds.bottom());
- EXPECT_EQ(root_bounds.bottom() - shelf_bounds.height() - 5,
- toast_bounds.bottom());
- }
+ // If host resize is not supported, ShelfLayoutManager::GetIdealBounds()
James Cook 2016/09/26 19:21:11 nit: delete this comment
sky 2016/09/26 19:26:36 Done.
+ // doesn't return correct value.
+ gfx::Rect shelf_bounds = shelf->GetIdealBounds();
+ EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds));
+ EXPECT_EQ(shelf_bounds.y() - 5, toast_bounds.bottom());
+ EXPECT_EQ(root_bounds.bottom() - shelf_bounds.height() - 5,
+ toast_bounds.bottom());
}
TEST_F(ToastManagerTest, PositionWithAutoHiddenBottomShelf) {
@@ -235,15 +233,13 @@ TEST_F(ToastManagerTest, PositionWithVisibleLeftShelf) {
EXPECT_TRUE(toast_bounds.Intersects(shelf->GetUserWorkAreaBounds()));
EXPECT_EQ(root_bounds.bottom() - 5, toast_bounds.bottom());
- if (SupportsHostWindowResize()) {
- // If host resize is not supported then calling WmShelf::GetIdealBounds()
- // doesn't return correct value.
- gfx::Rect shelf_bounds = shelf->GetIdealBounds();
- EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds));
- EXPECT_EQ(round(shelf_bounds.right() +
- (root_bounds.width() - shelf_bounds.width()) / 2.0),
- round(precise_toast_bounds.CenterPoint().x()));
- }
+ // If host resize is not supported then calling WmShelf::GetIdealBounds()
+ // doesn't return correct value.
+ gfx::Rect shelf_bounds = shelf->GetIdealBounds();
+ EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds));
+ EXPECT_EQ(round(shelf_bounds.right() +
+ (root_bounds.width() - shelf_bounds.width()) / 2.0),
+ round(precise_toast_bounds.CenterPoint().x()));
}
TEST_F(ToastManagerTest, PositionWithUnifiedDesktop) {
@@ -268,15 +264,13 @@ TEST_F(ToastManagerTest, PositionWithUnifiedDesktop) {
EXPECT_TRUE(root_bounds.Contains(toast_bounds));
EXPECT_NEAR(root_bounds.CenterPoint().x(), toast_bounds.CenterPoint().x(), 1);
- if (SupportsHostWindowResize()) {
- // If host resize is not supported then calling WmShelf::GetIdealBounds()
- // doesn't return correct value.
- gfx::Rect shelf_bounds = shelf->GetIdealBounds();
- EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds));
- EXPECT_EQ(shelf_bounds.y() - 5, toast_bounds.bottom());
- EXPECT_EQ(root_bounds.bottom() - shelf_bounds.height() - 5,
- toast_bounds.bottom());
- }
+ // If host resize is not supported then calling WmShelf::GetIdealBounds()
+ // doesn't return correct value.
+ gfx::Rect shelf_bounds = shelf->GetIdealBounds();
+ EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds));
+ EXPECT_EQ(shelf_bounds.y() - 5, toast_bounds.bottom());
+ EXPECT_EQ(root_bounds.bottom() - shelf_bounds.height() - 5,
+ toast_bounds.bottom());
}
TEST_F(ToastManagerTest, CancelToast) {

Powered by Google App Engine
This is Rietveld 408576698