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

Unified Diff: ash/wm/window_util_unittest.cc

Issue 1483083003: Set the window state consistently Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/wm/window_util_unittest.cc
diff --git a/ash/wm/window_util_unittest.cc b/ash/wm/window_util_unittest.cc
index 3ce125932bf97734d6ca87db8e60edad608a523b..db06127d70f713679e9c3b469aa6d2e8f667181e 100644
--- a/ash/wm/window_util_unittest.cc
+++ b/ash/wm/window_util_unittest.cc
@@ -76,6 +76,10 @@ TEST_F(WindowUtilTest, AdjustBoundsToEnsureMinimumVisibility) {
"125,125 100x100",
GetAdjustedBounds(visible_bounds_right, gfx::Rect(-100, 150, 150, 150)));
+ // Make sure that the window smaller than minimum visibility is fully visible.
+ EXPECT_EQ("200,140 20x10", GetAdjustedBounds(visible_bounds_right,
+ gfx::Rect(-100, 150, 20, 10)));
+
const gfx::Rect visible_bounds_left(-200, -50, 100, 100);
EXPECT_EQ(
"-190,-40 90x90",
@@ -91,6 +95,11 @@ TEST_F(WindowUtilTest, AdjustBoundsToEnsureMinimumVisibility) {
GetAdjustedBounds(visible_bounds_left, gfx::Rect(-400, -60, 150, 150)));
EXPECT_EQ("-125,0 100x100",
GetAdjustedBounds(visible_bounds_left, gfx::Rect(0, 0, 150, 150)));
+
+ // Make sure that the window smaller than minimum visibility is fully visible.
+ EXPECT_EQ(
+ "-200,50 0 20x10",
+ GetAdjustedBounds(visible_bounds_left, gfx::Rect(-100, 150, 20, 10)));
}
} // namespace ash
« no previous file with comments | « ash/wm/window_util.cc ('k') | chrome/browser/chromeos/customization/customization_wallpaper_downloader_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698