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

Unified Diff: ui/views/widget/widget_interactive_uitest.cc

Issue 404213003: [WIP] Allow scroll events to permanently change the default gesture handler in RootView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: friend test Created 6 years, 5 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/widget/widget_interactive_uitest.cc
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index 9f29b069b31f98dab006c9ecdd850ec3420853ca..48a4014428a7dcf2b742c87efde47e2434f65461 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -58,7 +58,7 @@ class ExitLoopOnRelease : public View {
DISALLOW_COPY_AND_ASSIGN(ExitLoopOnRelease);
};
-// A view that does a capture on gesture-begin events.
+// A view that does a capture on ui::ET_GESTURE_TAP_DOWN events.
class GestureCaptureView : public View {
public:
GestureCaptureView() {}
@@ -67,7 +67,7 @@ class GestureCaptureView : public View {
private:
// Overridden from View:
virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
- if (event->type() == ui::ET_GESTURE_BEGIN) {
+ if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
GetWidget()->SetCapture(this);
event->StopPropagation();
}
@@ -297,17 +297,19 @@ TEST_F(WidgetTestInteractive, ResetCaptureOnGestureEnd) {
toplevel->Show();
// Start a gesture on |gesture|.
- ui::GestureEvent begin(15,
- 15,
- 0,
- base::TimeDelta(),
- ui::GestureEventDetails(ui::ET_GESTURE_BEGIN, 0, 0));
+ ui::GestureEvent tap_down(15,
+ 15,
+ 0,
+ base::TimeDelta(),
+ ui::GestureEventDetails(ui::ET_GESTURE_TAP_DOWN,
+ 0,
+ 0));
ui::GestureEvent end(15,
15,
0,
base::TimeDelta(),
ui::GestureEventDetails(ui::ET_GESTURE_END, 0, 0));
- toplevel->OnGestureEvent(&begin);
+ toplevel->OnGestureEvent(&tap_down);
// Now try to click on |mouse|. Since |gesture| will have capture, |mouse|
// will not receive the event.

Powered by Google App Engine
This is Rietveld 408576698