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

Unified Diff: ui/views/view_unittest.cc

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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/views/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index ef607be2b52c19a27b6c82135c38ca601b8985b3..25c426dcd1bbbe0f1bed2f6dd826068a5b9f6797 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -981,15 +981,20 @@ TEST_F(ViewTest, HitTestMasks) {
gfx::Point v2_origin = v2_bounds.origin();
// Test HitTest
- EXPECT_TRUE(v1->HitTest(ConvertPointToView(v1, v1_centerpoint)));
- EXPECT_TRUE(v2->HitTest(ConvertPointToView(v2, v2_centerpoint)));
+ EXPECT_TRUE(v1->HitTest(gfx::Rect(ConvertPointToView(v1, v1_centerpoint),
+ gfx::Size(0, 0))));
+ EXPECT_TRUE(v2->HitTest(gfx::Rect(ConvertPointToView(v2, v2_centerpoint),
+ gfx::Size(0, 0))));
- EXPECT_TRUE(v1->HitTest(ConvertPointToView(v1, v1_origin)));
- EXPECT_FALSE(v2->HitTest(ConvertPointToView(v2, v2_origin)));
+ EXPECT_TRUE(v1->HitTest(gfx::Rect(ConvertPointToView(v1, v1_origin),
+ gfx::Size(0, 0))));
+ EXPECT_FALSE(v2->HitTest(gfx::Rect(ConvertPointToView(v2, v2_origin),
+ gfx::Size(0, 0))));
// Test GetEventHandlerForPoint
EXPECT_EQ(v1, root_view->GetEventHandlerForPoint(v1_centerpoint));
EXPECT_EQ(v2, root_view->GetEventHandlerForPoint(v2_centerpoint));
+
EXPECT_EQ(v1, root_view->GetEventHandlerForPoint(v1_origin));
EXPECT_EQ(root_view, root_view->GetEventHandlerForPoint(v2_origin));

Powered by Google App Engine
This is Rietveld 408576698