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

Unified Diff: ui/views/view_unittest.cc

Issue 327843002: Views which cannot process events cannot be tooltip targets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test coverage added Created 6 years, 6 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
« ui/views/view.cc ('K') | « ui/views/view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index 5a41d4e34fe2c551830364916647cc9449bedf2b..a8639bcdd0d9531a1c736b7fc36cac4c11d301c3 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -1311,6 +1311,16 @@ TEST_F(ViewTest, CanProcessEventsWithinSubtree) {
result_view = NULL;
result_view = root_view->GetTooltipHandlerForPoint(point_in_v);
EXPECT_EQ(v, result_view);
+
+ // When |v_grandchild| returns false when CanProcessEventsWithinSubtree()
+ // is called, then NULL should be returned as a target if we call
+ // GetTooltipHandlerForPoint() with |v_grandchild| as the root of the
+ // views tree. Note that the location must be in the coordinate space
+ // of the root view (|v_grandchild| in this case), so use (1, 1).
+
+ result_view = v_grandchild;
+ result_view = v_grandchild->GetTooltipHandlerForPoint(gfx::Point(1, 1));
+ EXPECT_EQ(NULL, result_view);
result_view = NULL;
// When |v_child| returns false when CanProcessEventsWithinSubtree()
« ui/views/view.cc ('K') | « ui/views/view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698