<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[244974] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/244974">244974</a></dd>
<dt>Author</dt> <dd>graouts@webkit.org</dd>
<dt>Date</dt> <dd>2019-05-06 13:39:28 -0700 (Mon, 06 May 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Tests under pointerevents/ios are flaky
https://bugs.webkit.org/show_bug.cgi?id=197624

Reviewed by Dean Jackson.

Tests under pointerevents/ios generate touches that use UIScriptController may not succeed if ran in multiple iterations or in a specific
order due to not ensuring that all touches are released when the test completes. We now ensure that we do when running swipes, taps, and pinches.

* pointerevents/ios/pointer-events-dispatch-on-stylus.html: Use the new ui.tapStylus() method to generate a tap with the stylus which ensures all
touches are removed upon completion.
* pointerevents/ios/pointer-events-dispatch-on-touch.html: Use a tap to ensure all touches are removed upon completion.
* pointerevents/ios/pointer-events-implicit-capture-has-pointer-capture-in-pointer-down.html: Use a tap to ensure all touches are removed upon completion.
* pointerevents/ios/pointer-events-implicit-capture-release-exception.html: Use a tap to ensure all touches are removed upon completion.
* pointerevents/ios/pointer-events-implicit-capture-release.html: Use a tap to ensure all touches are removed upon completion.
* pointerevents/ios/pointer-events-prevent-default-allows-click-event.html: Ensure both the "click" event and the tap generation have succeeded before
marking the test as complete.
* pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html: Use a tap to ensure all touches are removed upon completion.
* pointerevents/ios/touch-action-none-link-traversal.html: Ensure both the "load" event and the tap generation have succeeded before marking the test
as complete.
* pointerevents/ios/touch-action-pan-x-pan-y.html: Remove the requestAnimationFrame() call since ui.swipe() now resolves its promise once all touches
have completed.
* pointerevents/ios/touch-action-pan-x.html: Remove the requestAnimationFrame() call since ui.swipe() now resolves its promise once all touches
have completed.
* pointerevents/ios/touch-action-pan-y.html: Remove the requestAnimationFrame() call since ui.swipe() now resolves its promise once all touches
have completed.
* pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html: Remove the requestAnimationFrame() call since ui.pinchOut() now resolves its promise
once all touches have completed.
* pointerevents/ios/touch-action-pointercancel-pan-x.html: We don't need to track "pointermove" events since dispatch of "pointercancel" is asynchronous
and the number of "pointermove" events prior to its dispatch can legitimately vary.
* pointerevents/ios/touch-action-pointercancel-pan-y.html: We don't need to track "pointermove" events since dispatch of "pointercancel" is asynchronous
and the number of "pointermove" events prior to its dispatch can legitimately vary.
* pointerevents/utils.js:
(const.ui.new.UIController.prototype.swipe): Wait until the swipe is complete before resolving the promise.
(const.ui.new.UIController.prototype.pinchOut): Use a custom sequence to ensure that the pinch releases touches upon completion.
(const.ui.new.UIController.prototype.tapStylus): Introduce this new method to perform a stylus tap which ensures all touches are complete before resolving
the promise.
(const.ui.new.UIController.prototype.beginTouches): Deleted.
(const.ui.new.UIController.prototype.beginStylus): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestspointereventsiospointereventsdispatchonstylushtml">trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-stylus.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiospointereventsdispatchontouchhtml">trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-touch.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiospointereventsimplicitcapturehaspointercaptureinpointerdownhtml">trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-has-pointer-capture-in-pointer-down.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiospointereventsimplicitcapturereleaseexceptionhtml">trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-release-exception.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiospointereventsimplicitcapturereleasehtml">trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-release.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiospointereventspreventdefaultallowsclickeventhtml">trunk/LayoutTests/pointerevents/ios/pointer-events-prevent-default-allows-click-event.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiospointereventssetpointercaptureexceptionshtml">trunk/LayoutTests/pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiostouchactionnonelinktraversalhtml">trunk/LayoutTests/pointerevents/ios/touch-action-none-link-traversal.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiostouchactionpanxpanyhtml">trunk/LayoutTests/pointerevents/ios/touch-action-pan-x-pan-y.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiostouchactionpanxhtml">trunk/LayoutTests/pointerevents/ios/touch-action-pan-x.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiostouchactionpanyhtml">trunk/LayoutTests/pointerevents/ios/touch-action-pan-y.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiostouchactionpinchzoomallowszoominghtml">trunk/LayoutTests/pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiostouchactionpointercancelpanxhtml">trunk/LayoutTests/pointerevents/ios/touch-action-pointercancel-pan-x.html</a></li>
<li><a href="#trunkLayoutTestspointereventsiostouchactionpointercancelpanyhtml">trunk/LayoutTests/pointerevents/ios/touch-action-pointercancel-pan-y.html</a></li>
<li><a href="#trunkLayoutTestspointereventsutilsjs">trunk/LayoutTests/pointerevents/utils.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/ChangeLog 2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -1,3 +1,44 @@
</span><ins>+2019-05-06  Antoine Quint  <graouts@apple.com>
+
+        Tests under pointerevents/ios are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=197624
+
+        Reviewed by Dean Jackson.
+
+        Tests under pointerevents/ios generate touches that use UIScriptController may not succeed if ran in multiple iterations or in a specific
+        order due to not ensuring that all touches are released when the test completes. We now ensure that we do when running swipes, taps, and pinches.
+
+        * pointerevents/ios/pointer-events-dispatch-on-stylus.html: Use the new ui.tapStylus() method to generate a tap with the stylus which ensures all
+        touches are removed upon completion.
+        * pointerevents/ios/pointer-events-dispatch-on-touch.html: Use a tap to ensure all touches are removed upon completion.
+        * pointerevents/ios/pointer-events-implicit-capture-has-pointer-capture-in-pointer-down.html: Use a tap to ensure all touches are removed upon completion.
+        * pointerevents/ios/pointer-events-implicit-capture-release-exception.html: Use a tap to ensure all touches are removed upon completion.
+        * pointerevents/ios/pointer-events-implicit-capture-release.html: Use a tap to ensure all touches are removed upon completion.
+        * pointerevents/ios/pointer-events-prevent-default-allows-click-event.html: Ensure both the "click" event and the tap generation have succeeded before
+        marking the test as complete.
+        * pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html: Use a tap to ensure all touches are removed upon completion.
+        * pointerevents/ios/touch-action-none-link-traversal.html: Ensure both the "load" event and the tap generation have succeeded before marking the test
+        as complete.
+        * pointerevents/ios/touch-action-pan-x-pan-y.html: Remove the requestAnimationFrame() call since ui.swipe() now resolves its promise once all touches
+        have completed.
+        * pointerevents/ios/touch-action-pan-x.html: Remove the requestAnimationFrame() call since ui.swipe() now resolves its promise once all touches
+        have completed.
+        * pointerevents/ios/touch-action-pan-y.html: Remove the requestAnimationFrame() call since ui.swipe() now resolves its promise once all touches
+        have completed.
+        * pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html: Remove the requestAnimationFrame() call since ui.pinchOut() now resolves its promise
+        once all touches have completed.
+        * pointerevents/ios/touch-action-pointercancel-pan-x.html: We don't need to track "pointermove" events since dispatch of "pointercancel" is asynchronous
+        and the number of "pointermove" events prior to its dispatch can legitimately vary.
+        * pointerevents/ios/touch-action-pointercancel-pan-y.html: We don't need to track "pointermove" events since dispatch of "pointercancel" is asynchronous
+        and the number of "pointermove" events prior to its dispatch can legitimately vary.
+        * pointerevents/utils.js:
+        (const.ui.new.UIController.prototype.swipe): Wait until the swipe is complete before resolving the promise.
+        (const.ui.new.UIController.prototype.pinchOut): Use a custom sequence to ensure that the pinch releases touches upon completion.
+        (const.ui.new.UIController.prototype.tapStylus): Introduce this new method to perform a stylus tap which ensures all touches are complete before resolving
+        the promise.
+        (const.ui.new.UIController.prototype.beginTouches): Deleted.
+        (const.ui.new.UIController.prototype.beginStylus): Deleted.
+
</ins><span class="cx"> 2019-05-06  Truitt Savell  <tsavell@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Fix typo in https://trac.webkit.org/changeset/244962/webkit
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiospointereventsdispatchonstylushtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-stylus.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-stylus.html       2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-stylus.html  2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">         assert_approx_equals(event.tiltY, 20, 1);
</span><span class="cx">         test.done();
</span><span class="cx">     });
</span><del>-    ui.beginStylus({ x: 50, y: 50, pressure: 0.75, azimuthAngle: fifteenDegrees, altitudeAngle: thirtyDegrees });
</del><ins>+    ui.tapStylus({ x: 50, y: 50, pressure: 0.75, azimuthAngle: fifteenDegrees, altitudeAngle: thirtyDegrees });
</ins><span class="cx"> }, "Pointer events get dispatched in response to a stylus.");
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiospointereventsdispatchontouchhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-touch.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-touch.html        2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-dispatch-on-touch.html   2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">         assert_equals(event.pointerType, "touch");
</span><span class="cx">         test.done();
</span><span class="cx">     });
</span><del>-    ui.beginTouches({ x: 50, y: 50 });
</del><ins>+    ui.tap({ x: 50, y: 50 });
</ins><span class="cx"> }, "Pointer events get dispatched in response to a touch.");
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiospointereventsimplicitcapturehaspointercaptureinpointerdownhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-has-pointer-capture-in-pointer-down.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-has-pointer-capture-in-pointer-down.html     2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-has-pointer-capture-in-pointer-down.html        2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> 
</span><span class="cx"> target_test((target, test) => {
</span><span class="cx">     target.addEventListener("pointerdown", event => assert_true(target.hasPointerCapture(event.pointerId)));
</span><del>-    ui.beginTouches({ x: 50, y: 50 }).then(() => test.done());
</del><ins>+    ui.tap({ x: 50, y: 50 }).then(() => test.done());
</ins><span class="cx"> }, "Calling hasPointerCapture() in the 'pointerdown' event handler returns true for direct manipulation devices.");
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiospointereventsimplicitcapturereleaseexceptionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-release-exception.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-release-exception.html       2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-release-exception.html  2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">         assert_throws("NotFoundError", () => target.releasePointerCapture(event.pointerId + 1));
</span><span class="cx">         assert_true(target.hasPointerCapture(event.pointerId));
</span><span class="cx">     });
</span><del>-    ui.beginTouches({ x: 50, y: 50 }).then(() => test.done());
</del><ins>+    ui.tap({ x: 50, y: 50 }).then(() => test.done());
</ins><span class="cx"> }, "Calling releasePointerCapture() in the 'pointerdown' event handler with a bogus pointer id raises an exception and does not alter pointer capture.");
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiospointereventsimplicitcapturereleasehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-release.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-release.html 2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-release.html    2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">         target.releasePointerCapture(event.pointerId);
</span><span class="cx">         assert_false(target.hasPointerCapture(event.pointerId));
</span><span class="cx">     });
</span><del>-    ui.beginTouches({ x: 50, y: 50 }).then(() => test.done());
</del><ins>+    ui.tap({ x: 50, y: 50 }).then(() => test.done());
</ins><span class="cx"> }, "Calling releasePointerCapture() in the 'pointerdown' event handler makes hasPointerCapture() return false.");
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiospointereventspreventdefaultallowsclickeventhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/pointer-events-prevent-default-allows-click-event.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/pointer-events-prevent-default-allows-click-event.html       2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-prevent-default-allows-click-event.html  2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -14,8 +14,9 @@
</span><span class="cx"> 
</span><span class="cx"> target_test((target, test) => {
</span><span class="cx">     target.addEventListener("pointerdown", event => event.preventDefault());
</span><del>-    target.addEventListener("click", event => test.done());
-    ui.tap({ x: 100, y: 100 });
</del><ins>+    const clicked = new Promise(resolve => target.addEventListener("click", resolve));
+    const tapped = ui.tap({ x: 100, y: 100 });
+    Promise.all([clicked, tapped]).then(() => test.done());
</ins><span class="cx"> }, "A 'click' event is dispatched when tapping even if preventDefault() was called for a pointer event.");
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiospointereventssetpointercaptureexceptionshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html   2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html      2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">         assert_true(target.hasPointerCapture(event.pointerId));
</span><span class="cx">         assert_throws("InvalidStateError", () => document.createElement("div").setPointerCapture(event.pointerId), "Calling setPointerCapture() with a valid pointer id on a disconnected element throws an InvalidStateError exception.");
</span><span class="cx">     });
</span><del>-    ui.beginTouches({ x: 50, y: 50 }).then(() => test.done());
</del><ins>+    ui.tap({ x: 50, y: 50 }).then(() => test.done());
</ins><span class="cx"> }, "The setPointerCapture() method can throw.");
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiostouchactionnonelinktraversalhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/touch-action-none-link-traversal.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/touch-action-none-link-traversal.html        2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-none-link-traversal.html   2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -39,12 +39,16 @@
</span><span class="cx"> 
</span><span class="cx">     assert_equals(iframe.contentWindow.location.href, "about:blank", "The iframe initially has no URL.");
</span><span class="cx"> 
</span><del>-    iframe.addEventListener("load", () => {
-        assert_true(iframe.contentWindow.location.href.includes("disabled.html"), "Upon navigation the URL has a location.");
-        test.done();
</del><ins>+    const loaded = new Promise(resolve => {
+        iframe.addEventListener("load", () => {
+            assert_true(iframe.contentWindow.location.href.includes("disabled.html"), "Upon navigation the URL has a location.");
+            resolve();
+        });
</ins><span class="cx">     });
</span><span class="cx"> 
</span><del>-    ui.tap({ x: 100, y: 100 });
</del><ins>+    const tapped = ui.tap({ x: 100, y: 100 });
+
+    Promise.all([loaded, tapped]).then(() => test.done());
</ins><span class="cx"> }, "Testing that setting touch-action: none allows link traversal.");
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiostouchactionpanxpanyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/touch-action-pan-x-pan-y.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/touch-action-pan-x-pan-y.html        2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-pan-x-pan-y.html   2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -19,11 +19,9 @@
</span><span class="cx">     target.style.touchAction = "pan-x pan-y";
</span><span class="cx"> 
</span><span class="cx">     ui.swipe({ x: 150, y: 150 }, { x: 50, y: 50 }).then(() => {
</span><del>-        requestAnimationFrame(() => {
-            assert_not_equals(window.pageXOffset, 0, "The page was scrolled in the x-axis.");
-            assert_not_equals(window.pageYOffset, 0, "The page was scrolled in the y-axis.");
-            test.done();
-        });
</del><ins>+        assert_not_equals(window.pageXOffset, 0, "The page was scrolled in the x-axis.");
+        assert_not_equals(window.pageYOffset, 0, "The page was scrolled in the y-axis.");
+        test.done();
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx"> }, "Testing that setting 'touch-action: pan-x pan-y' on an element allows page scrolling in both axes.");
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiostouchactionpanxhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/touch-action-pan-x.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/touch-action-pan-x.html      2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-pan-x.html 2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -19,11 +19,9 @@
</span><span class="cx">     target.style.touchAction = "pan-x";
</span><span class="cx"> 
</span><span class="cx">     ui.swipe({ x: 150, y: 150 }, { x: 50, y: 50 }).then(() => {
</span><del>-        requestAnimationFrame(() => {
-            assert_not_equals(window.pageXOffset, 0, "The page was scrolled in the x-axis.");
-            assert_equals(window.pageYOffset, 0, "The page was not scrolled in the y-axis.");
-            test.done();
-        });
</del><ins>+        assert_not_equals(window.pageXOffset, 0, "The page was scrolled in the x-axis.");
+        assert_equals(window.pageYOffset, 0, "The page was not scrolled in the y-axis.");
+        test.done();
</ins><span class="cx">     });
</span><span class="cx"> }, "Testing that setting touch-action: pan-x on an element prevents page scrolling in the y-axis.");
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiostouchactionpanyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/touch-action-pan-y.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/touch-action-pan-y.html      2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-pan-y.html 2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -19,11 +19,9 @@
</span><span class="cx">     target.style.touchAction = "pan-y";
</span><span class="cx"> 
</span><span class="cx">     ui.swipe({ x: 150, y: 150 }, { x: 50, y: 50 }).then(() => {
</span><del>-        requestAnimationFrame(() => {
-            assert_equals(window.pageXOffset, 0, "The page was not scrolled in the x-axis.");
-            assert_not_equals(window.pageYOffset, 0, "The page was scrolled in the y-axis.");
-            test.done();
-        });
</del><ins>+        assert_equals(window.pageXOffset, 0, "The page was not scrolled in the x-axis.");
+        assert_not_equals(window.pageYOffset, 0, "The page was scrolled in the y-axis.");
+        test.done();
</ins><span class="cx">     });
</span><span class="cx"> }, "Testing that setting touch-action: pan-y on an element prevents page scrolling in the x-axis.");
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiostouchactionpinchzoomallowszoominghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html  2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html     2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -19,10 +19,8 @@
</span><span class="cx">     target.style.touchAction = "pinch-zoom";
</span><span class="cx"> 
</span><span class="cx">     ui.pinchOut({ x: 50, y: 50, width: 100, height: 100, scale: 0.5 }).then(() => {
</span><del>-        requestAnimationFrame(() => {
-            assert_not_equals(window.internals.pageScaleFactor(), 1, "The page was scaled.");
-            test.done();
-        });
</del><ins>+        assert_not_equals(window.internals.pageScaleFactor(), 1, "The page was scaled.");
+        test.done();
</ins><span class="cx">     });
</span><span class="cx"> }, "Testing that setting touch-action: pinch-zoom on an element allows page zooming.");
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiostouchactionpointercancelpanxhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/touch-action-pointercancel-pan-x.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/touch-action-pointercancel-pan-x.html        2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-pointercancel-pan-x.html   2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> 
</span><span class="cx">     target.style.touchAction = "pan-x";
</span><span class="cx"> 
</span><del>-    const eventTracker = new EventTracker(target, ["pointerdown", "pointermove", "pointerup", "pointercancel"]);
</del><ins>+    const eventTracker = new EventTracker(target, ["pointerdown", "pointerup", "pointercancel"]);
</ins><span class="cx"> 
</span><span class="cx">     const one = ui.finger();
</span><span class="cx">     ui.sequence([
</span><span class="lines">@@ -31,9 +31,6 @@
</span><span class="cx">     ]).then(() => {
</span><span class="cx">         eventTracker.assertMatchesEvents([
</span><span class="cx">             { type: "pointerdown" },
</span><del>-            { type: "pointermove" },
-            { type: "pointermove" },
-            { type: "pointermove" },
</del><span class="cx">             { type: "pointercancel" }
</span><span class="cx">         ]);
</span><span class="cx">         test.done();
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsiostouchactionpointercancelpanyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/ios/touch-action-pointercancel-pan-y.html (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/ios/touch-action-pointercancel-pan-y.html        2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-pointercancel-pan-y.html   2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> 
</span><span class="cx">     target.style.touchAction = "pan-y";
</span><span class="cx"> 
</span><del>-    const eventTracker = new EventTracker(target, ["pointerdown", "pointermove", "pointerup", "pointercancel"]);
</del><ins>+    const eventTracker = new EventTracker(target, ["pointerdown", "pointerup", "pointercancel"]);
</ins><span class="cx"> 
</span><span class="cx">     const one = ui.finger();
</span><span class="cx">     ui.sequence([
</span><span class="lines">@@ -31,9 +31,6 @@
</span><span class="cx">     ]).then(() => {
</span><span class="cx">         eventTracker.assertMatchesEvents([
</span><span class="cx">             { type: "pointerdown" },
</span><del>-            { type: "pointermove" },
-            { type: "pointermove" },
-            { type: "pointermove" },
</del><span class="cx">             { type: "pointercancel" }
</span><span class="cx">         ]);
</span><span class="cx">         test.done();
</span></span></pre></div>
<a id="trunkLayoutTestspointereventsutilsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/pointerevents/utils.js (244973 => 244974)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/pointerevents/utils.js 2019-05-06 20:36:40 UTC (rev 244973)
+++ trunk/LayoutTests/pointerevents/utils.js    2019-05-06 20:39:28 UTC (rev 244974)
</span><span class="lines">@@ -107,15 +107,12 @@
</span><span class="cx">         return this.fingers[id] = new Finger(id);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    beginTouches(options)
-    {
-        return this._run(`uiController.touchDownAtPoint(${options.x}, ${options.y}, ${options.numberOfTouches || 1})`);
-    }
-
</del><span class="cx">     swipe(from, to)
</span><span class="cx">     {
</span><del>-        const durationInSeconds = 0.5;
-        return this._run(`uiController.dragFromPointToPoint(${from.x}, ${from.y}, ${to.x}, ${to.y}, ${durationInSeconds})`);
</del><ins>+        const durationInSeconds = 0.1;
+        return new Promise(resolve => this._run(`uiController.dragFromPointToPoint(${from.x}, ${from.y}, ${to.x}, ${to.y}, ${durationInSeconds})`).then(() =>
+            setTimeout(resolve, durationInSeconds * 1000)
+        ));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     tap(options)
</span><span class="lines">@@ -132,55 +129,30 @@
</span><span class="cx">         options.x = options.x || 0;
</span><span class="cx">         options.y = options.y || 0;
</span><span class="cx"> 
</span><del>-        const startEvent = {
-            inputType : "hand",
-            timeOffset : 0,
-            touches : [
-                { inputType : "finger",
-                  phase : "moved",
-                  id : 1,
-                  x : options.x,
-                  y : options.y,
-                  pressure : 0
-                },
-                { inputType : "finger",
-                  phase : "moved",
-                  id : 2,
-                  x : (options.x + options.width) / options.scale,
-                  y : (options.y + options.height) / options.scale,
-                  pressure : 0
-                }
-            ]
-        };
</del><ins>+        const startPoint = { x: options.x + options.width, y: options.y + options.height };
+        const endPoint = { x: options.x + options.width * options.scale, y: options.y + options.height * options.scale };
</ins><span class="cx"> 
</span><del>-        const endEvent = {
-            inputType : "hand",
-            timeOffset : 0.5,
-            touches : [
-                { inputType : "finger",
-                  phase : "moved",
-                  id : 1,
-                  x : options.x,
-                  y : options.y,
-                  pressure : 0
-                },
-                { inputType : "finger",
-                  phase : "moved",
-                  id : 2,
-                  x : options.x + options.width,
-                  y : options.y + options.height,
-                  pressure : 0
-                }
-            ]
-        };
</del><ins>+        function step(factor)
+        {
+            return {
+                x: endPoint.x + (startPoint.x - endPoint.x) * (1 - factor),
+                y: endPoint.y + (startPoint.y - endPoint.y) * (1 - factor)
+            };
+        }
</ins><span class="cx"> 
</span><del>-        return this._runEvents([{
-            interpolate : "linear",
-            timestep: 0.1,
-            coordinateSpace : "content",
-            startEvent: startEvent,
-            endEvent: endEvent
-        }]);
</del><ins>+        const one = this.finger();
+        const two = this.finger();
+        return this.sequence([
+            one.begin({ x: options.x, y: options.y }),
+            two.begin(step(0)),
+            two.move(step(0.2)),
+            two.move(step(0.4)),
+            two.move(step(0.6)),
+            two.move(step(0.8)),
+            two.move(step(1)),
+            one.end(),
+            two.end()
+        ]);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     sequence(touches)
</span><span class="lines">@@ -217,12 +189,12 @@
</span><span class="cx">         }));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    beginStylus(options)
</del><ins>+    tapStylus(options)
</ins><span class="cx">     {
</span><span class="cx">         options.azimuthAngle = options.azimuthAngle || 0;
</span><span class="cx">         options.altitudeAngle = options.altitudeAngle || 0;
</span><span class="cx">         options.pressure = options.pressure || 0;
</span><del>-        return this._run(`uiController.stylusDownAtPoint(${options.x}, ${options.y}, ${options.azimuthAngle}, ${options.altitudeAngle}, ${options.pressure})`);
</del><ins>+        return this._run(`uiController.stylusTapAtPoint(${options.x}, ${options.y}, ${options.azimuthAngle}, ${options.altitudeAngle}, ${options.pressure})`);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _runEvents(events)
</span></span></pre>
</div>
</div>

</body>
</html>