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

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

Issue 2370913002: Removes AshTestBase::SupportsHostWindowResize (Closed)
Patch Set: feedback 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
« no previous file with comments | « ash/shell_unittest.cc ('k') | ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc » ('j') | no next file with comments »
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 1d22db8c2d752b8aa5b41469b9d7379c34aa2607..04d5355a6c373dbe5905adeefb4c91cacdfbd57b 100644
--- a/ash/system/toast/toast_manager_unittest.cc
+++ b/ash/system/toast/toast_manager_unittest.cc
@@ -171,15 +171,11 @@ 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());
- }
+ 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 +231,11 @@ 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()));
- }
+ 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 +260,11 @@ 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());
- }
+ 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) {
« no previous file with comments | « ash/shell_unittest.cc ('k') | ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698