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

Unified Diff: ui/aura/window_unittest.cc

Issue 9580001: Aura: Update window frames, allow resize from outside window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix caption for maximized windows, new resize cursor tweak Created 8 years, 10 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: ui/aura/window_unittest.cc
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index f78ed7c38a438616c0ab714782538163e9edd0b8..48592f75e42fe255ae1b460cede7b2ac95e57d50 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -273,7 +273,7 @@ TEST_F(WindowTest, HitTest) {
Window w1(new ColorTestWindowDelegate(SK_ColorWHITE));
w1.set_id(1);
w1.Init(ui::Layer::LAYER_TEXTURED);
- w1.SetBounds(gfx::Rect(10, 10, 50, 50));
+ w1.SetBounds(gfx::Rect(10, 20, 50, 60));
w1.Show();
w1.SetParent(NULL);
@@ -281,6 +281,11 @@ TEST_F(WindowTest, HitTest) {
EXPECT_TRUE(w1.HitTest(gfx::Point(1, 1)));
EXPECT_FALSE(w1.HitTest(gfx::Point(-1, -1)));
+ // We can expand the bounds slightly to track events outside our border.
+ w1.set_hit_test_bounds_inset(-1);
+ EXPECT_TRUE(w1.HitTest(gfx::Point(-1, -1)));
+ EXPECT_FALSE(w1.HitTest(gfx::Point(-2, -2)));
+
// TODO(beng): clip Window to parent.
}

Powered by Google App Engine
This is Rietveld 408576698