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

Unified Diff: trunk/src/ash/wm/window_util_unittest.cc

Issue 131543006: Revert 243986 "Fix AdjustBoundsToEnsureWindowVisibility to work ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 | « trunk/src/ash/wm/window_util.cc ('k') | trunk/src/ash/wm/workspace/workspace_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/wm/window_util_unittest.cc
===================================================================
--- trunk/src/ash/wm/window_util_unittest.cc (revision 244019)
+++ trunk/src/ash/wm/window_util_unittest.cc (working copy)
@@ -10,16 +10,6 @@
namespace ash {
-namespace {
-
-std::string GetAdjustedBounds(const gfx::Rect& visible,
- gfx::Rect to_be_adjusted) {
- wm::AdjustBoundsToEnsureMinimumWindowVisibility(visible, &to_be_adjusted);
- return to_be_adjusted.ToString();
-}
-
-}
-
typedef test::AshTestBase WindowUtilTest;
TEST_F(WindowUtilTest, CenterWindow) {
@@ -39,54 +29,4 @@
EXPECT_EQ("750,126 100x100", window->GetBoundsInScreen().ToString());
}
-TEST_F(WindowUtilTest, AdjustBoundsToEnsureMinimumVisibility) {
- const gfx::Rect visible_bounds(0, 0, 100, 100);
-
- EXPECT_EQ("0,0 90x90",
- GetAdjustedBounds(visible_bounds, gfx::Rect(0, 0, 90, 90)));
- EXPECT_EQ("0,0 100x100",
- GetAdjustedBounds(visible_bounds, gfx::Rect(0, 0, 150, 150)));
- EXPECT_EQ("-50,0 100x100",
- GetAdjustedBounds(visible_bounds, gfx::Rect(-50, -50, 150, 150)));
- EXPECT_EQ("-90,10 100x100",
- GetAdjustedBounds(visible_bounds, gfx::Rect(-100, 10, 150, 150)));
- EXPECT_EQ("90,90 100x100",
- GetAdjustedBounds(visible_bounds, gfx::Rect(100, 100, 150, 150)));
-
- const gfx::Rect visible_bounds_right(200, 50, 100, 100);
-
- EXPECT_EQ(
- "210,60 90x90",
- GetAdjustedBounds(visible_bounds_right, gfx::Rect(210, 60, 90, 90)));
- EXPECT_EQ(
- "210,60 100x100",
- GetAdjustedBounds(visible_bounds_right, gfx::Rect(210, 60, 150, 150)));
- EXPECT_EQ(
- "110,50 100x100",
- GetAdjustedBounds(visible_bounds_right, gfx::Rect(0, 0, 150, 150)));
- EXPECT_EQ(
- "290,50 100x100",
- GetAdjustedBounds(visible_bounds_right, gfx::Rect(300, 20, 150, 150)));
- EXPECT_EQ(
- "110,140 100x100",
- GetAdjustedBounds(visible_bounds_right, gfx::Rect(-100, 150, 150, 150)));
-
- const gfx::Rect visible_bounds_left(-200, -50, 100, 100);
- EXPECT_EQ(
- "-190,-40 90x90",
- GetAdjustedBounds(visible_bounds_left, gfx::Rect(-190, -40, 90, 90)));
- EXPECT_EQ(
- "-190,-40 100x100",
- GetAdjustedBounds(visible_bounds_left, gfx::Rect(-190, -40, 150, 150)));
- EXPECT_EQ(
- "-250,-40 100x100",
- GetAdjustedBounds(visible_bounds_left, gfx::Rect(-250, -40, 150, 150)));
- EXPECT_EQ(
- "-290,-50 100x100",
- GetAdjustedBounds(visible_bounds_left, gfx::Rect(-400, -60, 150, 150)));
- EXPECT_EQ(
- "-110,0 100x100",
- GetAdjustedBounds(visible_bounds_left, gfx::Rect(0, 0, 150, 150)));
-}
-
} // namespace ash
« no previous file with comments | « trunk/src/ash/wm/window_util.cc ('k') | trunk/src/ash/wm/workspace/workspace_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698