fast/workers/worker-user-gesture.html crashes on iOS
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jul 2017 20:39:53 +0000 (20:39 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jul 2017 20:39:53 +0000 (20:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174592

Reviewed by Simon Fraser.

Make sure the tap/click event is fully processed before finishing the test by using
the promise returned by UIHelper.activateAt().

* fast/workers/worker-user-gesture.html:

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

LayoutTests/ChangeLog
LayoutTests/fast/workers/worker-user-gesture.html

index 1c7972a..8758c6b 100644 (file)
@@ -1,3 +1,15 @@
+2017-07-17  Chris Dumez  <cdumez@apple.com>
+
+        fast/workers/worker-user-gesture.html crashes on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=174592
+
+        Reviewed by Simon Fraser.
+
+        Make sure the tap/click event is fully processed before finishing the test by using
+        the promise returned by UIHelper.activateAt().
+
+        * fast/workers/worker-user-gesture.html:
+
 2017-07-17  Simon Fraser  <simon.fraser@apple.com>
 
         clientX/clientY on TouchEvent.touches are wrong
index 65ba863..cc5bf54 100644 (file)
@@ -18,12 +18,13 @@ function doUserGesture() {
     let inputElement = document.getElementById("testButton");
     let centerX = inputElement.offsetLeft + inputElement.offsetWidth / 2;
     let centerY = inputElement.offsetTop + inputElement.offsetHeight / 2;
-    UIHelper.activateAt(centerX, centerY);
-    if (++gestureCount == 10) {
-        finishJSTest();
-        return;
-    }
-    setTimeout(doUserGesture, 0);
+    UIHelper.activateAt(centerX, centerY).then(function() {
+        if (++gestureCount == 10) {
+            finishJSTest();
+            return;
+        }
+        setTimeout(doUserGesture, 0);
+    });
 }
 
 setTimeout(doUserGesture, 0);