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

Unified Diff: ui/views/view_targeter_unittest.cc

Issue 533323004: Remove RootView::DispatchGestureEvent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test added, member name changed Created 6 years, 3 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 | « ui/events/test/test_event_processor.cc ('k') | ui/views/widget/root_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_targeter_unittest.cc
diff --git a/ui/views/view_targeter_unittest.cc b/ui/views/view_targeter_unittest.cc
index c860c6721145d959ed1f7c70904b43b3e1fe1bf3..92d0fd6fecaae65858ec0d2de9c1939a18ff30bc 100644
--- a/ui/views/view_targeter_unittest.cc
+++ b/ui/views/view_targeter_unittest.cc
@@ -88,9 +88,9 @@ class ViewTargeterTest : public ViewsTestBase {
root_view->gesture_handler_ = handler;
}
- void SetAllowGestureEventRetargeting(internal::RootView* root_view,
- bool allow) {
- root_view->allow_gesture_event_retargeting_ = allow;
+ void SetGestureHandlerSetBeforeProcessing(internal::RootView* root_view,
+ bool set) {
+ root_view->gesture_handler_set_before_processing_ = set;
}
private:
@@ -282,7 +282,7 @@ TEST_F(ViewTargeterTest, ViewTargeterForGestureEvents) {
// re-targeting should be prohibited for TAP but permitted for
// GESTURE_SCROLL_BEGIN (which should be re-targeted to the parent of
// |grandchild|).
- SetAllowGestureEventRetargeting(root_view, false);
+ SetGestureHandlerSetBeforeProcessing(root_view, true);
SetGestureHandler(root_view, grandchild);
EXPECT_EQ(grandchild, targeter->FindTargetForEvent(root_view, &tap));
EXPECT_EQ(NULL, targeter->FindNextBestTarget(grandchild, &tap));
@@ -299,7 +299,7 @@ TEST_F(ViewTargeterTest, ViewTargeterForGestureEvents) {
// in the process of finding the View to which subsequent gestures will be
// dispatched, so TAP and SCROLL_BEGIN events should be re-targeted up
// the ancestor chain.
- SetAllowGestureEventRetargeting(root_view, true);
+ SetGestureHandlerSetBeforeProcessing(root_view, false);
EXPECT_EQ(child, targeter->FindNextBestTarget(grandchild, &tap));
EXPECT_EQ(child, targeter->FindNextBestTarget(grandchild, &scroll_begin));
@@ -313,7 +313,7 @@ TEST_F(ViewTargeterTest, ViewTargeterForGestureEvents) {
// re-targeted in this case (regardless of the view that is passed in to
// FindNextBestTarget() as the previous target).
SetGestureHandler(root_view, NULL);
- SetAllowGestureEventRetargeting(root_view, false);
+ SetGestureHandlerSetBeforeProcessing(root_view, true);
EXPECT_EQ(NULL, targeter->FindNextBestTarget(child, &tap));
EXPECT_EQ(NULL, targeter->FindNextBestTarget(NULL, &tap));
EXPECT_EQ(NULL, targeter->FindNextBestTarget(content, &scroll_begin));
@@ -338,7 +338,7 @@ TEST_F(ViewTargeterTest, ViewTargeterForGestureEvents) {
// If no default gesture handler is currently set, targeting should be
// performed using the location of the gesture event for a TAP and a
// SCROLL_BEGIN.
- SetAllowGestureEventRetargeting(root_view, true);
+ SetGestureHandlerSetBeforeProcessing(root_view, false);
EXPECT_EQ(grandchild, targeter->FindTargetForEvent(root_view, &tap));
EXPECT_EQ(grandchild, targeter->FindTargetForEvent(root_view, &scroll_begin));
« no previous file with comments | « ui/events/test/test_event_processor.cc ('k') | ui/views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698