[chromium] Add support to DumpRenderTree [EventSender] for GestureTapDown events.
authorwjmaclean@chromium.org <wjmaclean@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Aug 2012 19:25:55 +0000 (19:25 +0000)
committerwjmaclean@chromium.org <wjmaclean@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Aug 2012 19:25:55 +0000 (19:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93286

Reviewed by James Robinson.

Tools:

Adds support to generate GestureTapDown events from EventSender, to facilitate
link highlighting layout tests.

Added a GestureTapEvent to one existing test, more tests to follow when LinkHighlight CLs start to land.

* DumpRenderTree/chromium/TestRunner/EventSender.cpp:
(EventSender::EventSender):
(EventSender::gestureTapDown):
(EventSender::gestureEvent):
* DumpRenderTree/chromium/TestRunner/EventSender.h:
(EventSender):

LayoutTests:

Adds support to generate GestureTapDown events from EventSender, to facilitate
link highlighting layout tests.

Added a GestureTapEvent to one existing test, more tests to follow when LinkHighlight CLs start to land.

* platform/chromium/plugins/gesture-events-expected.txt:
* platform/chromium/plugins/gesture-events.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124906 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/chromium/plugins/gesture-events-expected.txt
LayoutTests/platform/chromium/plugins/gesture-events.html
Tools/ChangeLog
Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp
Tools/DumpRenderTree/chromium/TestRunner/EventSender.h

index 06dd553..e7c3cee 100644 (file)
@@ -1,3 +1,18 @@
+2012-08-07  W. James MacLean  <wjmaclean@chromium.org>
+
+        [chromium] Add support to DumpRenderTree [EventSender] for GestureTapDown events.
+        https://bugs.webkit.org/show_bug.cgi?id=93286
+
+        Reviewed by James Robinson.
+
+        Adds support to generate GestureTapDown events from EventSender, to facilitate
+        link highlighting layout tests.
+
+        Added a GestureTapEvent to one existing test, more tests to follow when LinkHighlight CLs start to land.
+
+        * platform/chromium/plugins/gesture-events-expected.txt:
+        * platform/chromium/plugins/gesture-events.html:
+
 2012-08-07  Marcelo Lira  <marcelo.lira@openbossa.org>
 
         [Qt] Add support for the Gamepad API
index 2fda426..66c111a 100644 (file)
@@ -3,6 +3,7 @@ Plugin received event: MouseEnter
 Plugin received event: MouseMove
 Plugin received event: MouseDown
 Plugin received event: MouseUp
+Plugin received event: GestureTapDown
 Plugin received event: GestureScrollBegin
 Plugin received event: GestureScrollUpdate
 Plugin received event: MouseWheel
index 4dd2b36..e47bce5 100644 (file)
@@ -21,6 +21,7 @@
         var positionX = plugin.offsetLeft + 10;
         var positionY = plugin.offsetTop + 10;
         eventSender.gestureTap(positionX, positionY);
+        eventSender.gestureTapDown(positionX, positionY);
         eventSender.gestureScrollBegin(positionX, positionY);
         eventSender.gestureScrollUpdate(30, 0);
         eventSender.gestureScrollEnd(0, 0);
index 6423558..c34f7c4 100644 (file)
@@ -1,3 +1,22 @@
+2012-08-07  W. James MacLean  <wjmaclean@chromium.org>
+
+        [chromium] Add support to DumpRenderTree [EventSender] for GestureTapDown events.
+        https://bugs.webkit.org/show_bug.cgi?id=93286
+
+        Reviewed by James Robinson.
+
+        Adds support to generate GestureTapDown events from EventSender, to facilitate
+        link highlighting layout tests.
+        Added a GestureTapEvent to one existing test, more tests to follow when LinkHighlight CLs start to land.
+
+        * DumpRenderTree/chromium/TestRunner/EventSender.cpp:
+        (EventSender::EventSender):
+        (EventSender::gestureTapDown):
+        (EventSender::gestureEvent):
+        * DumpRenderTree/chromium/TestRunner/EventSender.h:
+        (EventSender):
+
 2012-08-07  Marcelo Lira  <marcelo.lira@openbossa.org>
 
         [Qt] Add support for the Gamepad API
index 1ebd741..cafaca9 100644 (file)
@@ -286,6 +286,7 @@ EventSender::EventSender()
     bindMethod("gestureScrollFirstPoint", &EventSender::gestureScrollFirstPoint);
     bindMethod("gestureScrollUpdate", &EventSender::gestureScrollUpdate);
     bindMethod("gestureTap", &EventSender::gestureTap);
+    bindMethod("gestureTapDown", &EventSender::gestureTapDown);
     bindMethod("gestureLongPress", &EventSender::gestureLongPress);
     bindMethod("gestureTwoFingerTap", &EventSender::gestureTwoFingerTap);
     bindMethod("zoomPageIn", &EventSender::zoomPageIn);
@@ -1112,6 +1113,12 @@ void EventSender::gestureTap(const CppArgumentList& arguments, CppVariant* resul
     gestureEvent(WebInputEvent::GestureTap, arguments);
 }
 
+void EventSender::gestureTapDown(const CppArgumentList& arguments, CppVariant* result)
+{
+    result->setNull();
+    gestureEvent(WebInputEvent::GestureTapDown, arguments);
+}
+
 void EventSender::gestureLongPress(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
@@ -1173,6 +1180,10 @@ void EventSender::gestureEvent(WebInputEvent::Type type, const CppArgumentList&
         event.x = point.x;
         event.y = point.y;
         break;
+    case WebInputEvent::GestureTapDown:
+        event.x = point.x;
+        event.y = point.y;
+        break;
     case WebInputEvent::GestureLongPress:
         event.x = point.x;
         event.y = point.y;
index c187f0e..828e7c8 100644 (file)
@@ -105,6 +105,7 @@ public:
     void gestureScrollFirstPoint(const CppArgumentList&, CppVariant*);
     void gestureScrollUpdate(const CppArgumentList&, CppVariant*);
     void gestureTap(const CppArgumentList&, CppVariant*);
+    void gestureTapDown(const CppArgumentList&, CppVariant*);
     void gestureLongPress(const CppArgumentList&, CppVariant*);
     void gestureTwoFingerTap(const CppArgumentList&, CppVariant*);
     void gestureEvent(WebKit::WebInputEvent::Type, const CppArgumentList&);