Title: [195373] branches/safari-601.1.46-branch/LayoutTests

Diff

Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (195372 => 195373)


--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2016-01-20 21:00:11 UTC (rev 195372)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2016-01-20 21:00:18 UTC (rev 195373)
@@ -1,5 +1,21 @@
 2016-01-20  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r195158. rdar://problem/24208157
+
+    2016-01-15  Beth Dakin  <bda...@apple.com>
+
+            Add a test for touch events in scaled documents
+            https://bugs.webkit.org/show_bug.cgi?id=153149
+            -and corresponding-
+            rdar://problem/24181371
+
+            Reviewed by Simon Fraser.
+
+            * fast/events/touch/ios/touch-event-in-scaled-document-expected.txt: Added.
+            * fast/events/touch/ios/touch-event-in-scaled-document.html: Added.
+
+2016-01-20  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r195089. rdar://problem/24101168
 
     2016-01-14  Myles C. Maxfield  <mmaxfi...@apple.com>

Added: branches/safari-601.1.46-branch/LayoutTests/fast/events/touch/ios/touch-event-in-scaled-document-expected.txt (0 => 195373)


--- branches/safari-601.1.46-branch/LayoutTests/fast/events/touch/ios/touch-event-in-scaled-document-expected.txt	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/events/touch/ios/touch-event-in-scaled-document-expected.txt	2016-01-20 21:00:18 UTC (rev 195373)
@@ -0,0 +1,3 @@
+Tap me
+Received event touchstart at 500, 650
+Done

Added: branches/safari-601.1.46-branch/LayoutTests/fast/events/touch/ios/touch-event-in-scaled-document.html (0 => 195373)


--- branches/safari-601.1.46-branch/LayoutTests/fast/events/touch/ios/touch-event-in-scaled-document.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/events/touch/ios/touch-event-in-scaled-document.html	2016-01-20 21:00:18 UTC (rev 195373)
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="initial-scale=0.5,maximum-scale=2,minimum-scale=0.25,user-scalable=yes" />
+<style>
+#target {
+    width: 1200px;
+    height: 1200px;
+    border: 10px solid black;
+    background-color: silver;
+}
+        
+#target.tapped {
+    background-color: green;
+}
+</style>
+
+<script>
+
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+function getUIScript()
+{
+    return `
+    (function() {
+        uiController.singleTapAtPoint(500, 650, function() {
+            uiController.uiScriptComplete("Done");
+        });
+    })();`
+}
+
+function setUp()
+{
+    var output = '';
+    var target = document.getElementById('target');
+    target.addEventListener('touchstart', function(event) {
+        output += 'Received event ' + event.type + ' at ' + event.touches[0].clientX + ', ' + event.touches[0].clientY + '<br>';
+        target.classList.toggle('tapped');
+    });
+
+    if (testRunner.runUIScript) {
+        testRunner.runUIScript(getUIScript(), function(result) {
+            output += result;
+            document.getElementById('console').innerHTML = output;
+            testRunner.notifyDone();
+        });
+    }
+}
+
+window.addEventListener('load', setUp, false);
+</script>
+</head>
+
+<body>
+<div id="target">Tap me</div>
+<pre id="console">To test manually, tap the box. If it turns green, then the test passes.</pre>
+</body>
+
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to