Diff
Modified: trunk/LayoutTests/ChangeLog (237901 => 237902)
--- trunk/LayoutTests/ChangeLog 2018-11-07 00:19:14 UTC (rev 237901)
+++ trunk/LayoutTests/ChangeLog 2018-11-07 00:46:34 UTC (rev 237902)
@@ -1,3 +1,19 @@
+2018-11-06 Dean Jackson <[email protected]>
+
+ Add some basic pointer events tests
+ https://bugs.webkit.org/show_bug.cgi?id=191336
+ <rdar://problem/45858574>
+
+ Reviewed by Wenson Hsieh.
+
+ Generate some fake touches for pointer events testing.
+
+ * fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup-expected.txt: Added.
+ * fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html: Added.
+ * fast/events/pointer/ios/tap-gives-pointerdown-pointerup-expected.txt: Added.
+ * fast/events/pointer/ios/tap-gives-pointerdown-pointerup.html: Added.
+ * platform/ios/TestExpectations:
+
2018-11-06 Timothy Hatcher <[email protected]>
Skip css-dark-mode tests on older macOS platforms
Added: trunk/LayoutTests/fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup-expected.txt (0 => 237902)
--- trunk/LayoutTests/fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup-expected.txt 2018-11-07 00:46:34 UTC (rev 237902)
@@ -0,0 +1,14 @@
+Test that a drag is registered as a pointerdown, then pointermoves, then pointerup.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+ pointerdown fired.
+Remove this when bug 19133 is fixed.
+At least one pointermove was fired.
+pointerup fired.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup-expected.txt
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/plain
\ No newline at end of property
Added: trunk/LayoutTests/fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html (0 => 237902)
--- trunk/LayoutTests/fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html (rev 0)
+++ trunk/LayoutTests/fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html 2018-11-07 00:46:34 UTC (rev 237902)
@@ -0,0 +1,57 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:PointerEventsEnabled=true ] -->
+<html>
+<head>
+ <script src=""
+ <script src=""
+ <style>
+ body {
+ margin: none;
+ }
+ </style>
+ <meta name="viewport" content="initial-scale=1">
+</head>
+<body>
+ <p id="description"></p>
+ <div id="console">
+ </div>
+ <script>
+ description("Test that a drag is registered as a pointerdown, then pointermoves, then pointerup.");
+ window.jsTestIsAsync = true;
+
+ function runTest()
+ {
+ // FIXME: At the moment a touch listener is required due
+ // to the way pointer events are dispatched.
+ // https://bugs.webkit.org/show_bug.cgi?id=191333
+ window.addEventListener("touchstart", (event) => {
+ debug("Remove this when bug 19133 is fixed.");
+ });
+
+ window.addEventListener("pointerdown", (event) => {
+ debug("pointerdown fired.");
+ });
+
+ seenMove = false;
+ window.addEventListener("pointermove", (event) => {
+ if (!seenMove)
+ debug("At least one pointermove was fired.");
+ seenMove = true;
+ });
+
+ window.addEventListener("pointerup", (event) => {
+ debug("pointerup fired.");
+ finishJSTest();
+ });
+
+ if (window.testRunner) {
+ touchAndDragFromPointToPoint(50, 200, 60, 210).then(() => {
+ liftUpAtPoint(60, 210);
+ });
+ }
+ }
+
+ window.addEventListener("load", runTest, false);
+ </script>
+ <script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/fast/events/pointer/ios/drag-gives-pointerdown-pointermove-pointerup.html
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/html
\ No newline at end of property
Added: trunk/LayoutTests/fast/events/pointer/ios/tap-gives-pointerdown-pointerup-expected.txt (0 => 237902)
--- trunk/LayoutTests/fast/events/pointer/ios/tap-gives-pointerdown-pointerup-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/pointer/ios/tap-gives-pointerdown-pointerup-expected.txt 2018-11-07 00:46:34 UTC (rev 237902)
@@ -0,0 +1,13 @@
+Test that a tap is registered as a pointerdown then pointerup.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+ pointerdown fired.
+Remove this when bug 19133 is fixed.
+pointerup fired.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/fast/events/pointer/ios/tap-gives-pointerdown-pointerup-expected.txt
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/plain
\ No newline at end of property
Added: trunk/LayoutTests/fast/events/pointer/ios/tap-gives-pointerdown-pointerup.html (0 => 237902)
--- trunk/LayoutTests/fast/events/pointer/ios/tap-gives-pointerdown-pointerup.html (rev 0)
+++ trunk/LayoutTests/fast/events/pointer/ios/tap-gives-pointerdown-pointerup.html 2018-11-07 00:46:34 UTC (rev 237902)
@@ -0,0 +1,46 @@
+<!DOCTYPE html><!-- webkit-test-runner [ experimental:PointerEventsEnabled=true ] -->
+<html>
+<head>
+ <script src=""
+ <script src=""
+ <style>
+ body {
+ margin: none;
+ }
+ </style>
+ <meta name="viewport" content="initial-scale=1">
+</head>
+<body>
+ <p id="description"></p>
+ <div id="console">
+ </div>
+ <script>
+ description("Test that a tap is registered as a pointerdown then pointerup.");
+ window.jsTestIsAsync = true;
+
+ function runTest()
+ {
+ // FIXME: At the moment a touch listener is required due
+ // to the way pointer events are dispatched.
+ // https://bugs.webkit.org/show_bug.cgi?id=191333
+ window.addEventListener("touchstart", (event) => {
+ debug("Remove this when bug 19133 is fixed.");
+ });
+
+ window.addEventListener("pointerdown", (event) => {
+ debug("pointerdown fired.");
+ });
+
+ window.addEventListener("pointerup", (event) => {
+ debug("pointerup fired.");
+ finishJSTest();
+ });
+
+ UIHelper.tapAt(50, 200);
+ }
+
+ window.addEventListener("load", runTest, false);
+ </script>
+ <script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/fast/events/pointer/ios/tap-gives-pointerdown-pointerup.html
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/html
\ No newline at end of property
Modified: trunk/LayoutTests/platform/ios/TestExpectations (237901 => 237902)
--- trunk/LayoutTests/platform/ios/TestExpectations 2018-11-07 00:19:14 UTC (rev 237901)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2018-11-07 00:46:34 UTC (rev 237902)
@@ -3218,3 +3218,6 @@
webkit.org/b/190764 editing/spelling/spelling-dots-position.html [ Skip ]
webkit.org/b/190764 editing/spelling/spelling-dots-position-2.html [ Skip ]
webkit.org/b/190764 editing/spelling/spelling-dots-position-3.html [ Skip ]
+
+# Skip on OpenSource while the code is in WebKitAdditions
+fast/events/pointer [ Skip ]