Deleted: trunk/LayoutTests/fast/events/touch/ios/long-press-then-drag-to-select-text.html (222586 => 222587)
--- trunk/LayoutTests/fast/events/touch/ios/long-press-then-drag-to-select-text.html 2017-09-27 23:58:33 UTC (rev 222586)
+++ trunk/LayoutTests/fast/events/touch/ios/long-press-then-drag-to-select-text.html 2017-09-28 00:07:12 UTC (rev 222587)
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
- <script src=""
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- function runTest()
- {
- if (!testRunner.runUIScript)
- return;
-
- var output = '';
- var target = document.getElementById('target');
-
- if (testRunner.runUIScript) {
- testRunner.runUIScript(pressAndHoldAtPoint(147, 85), function(result) {
- if (document.getSelection().toString() == "elit")
- output += 'PASS: Correct Selection';
- else if(document.getSelection().toString() == "")
- output += 'FAIL: failed to select a word as a result of a long press';
- else
- output += 'FAIL: failed to select correct word as a result of a long press. Incorrect selection: ' + document.getSelection().toString();
- output += '<br>';
-
- testRunner.runUIScript(continueTouchAndDragFromPointToPoint(147,85,60,85), function(result) {
- if (document.getSelection().toString() == "adipiscing")
- output += 'PASS: Correct Selection';
- else if(document.getSelection().toString() == "")
- output += 'FAIL: failed to select a word as a result of a drag after long press';
- else
- output += 'FAIL: failed to select correct word as a result of a drag after long press. Incorrect selection: ' + document.getSelection().toString();
-
- output += '<br>';
- document.getElementById('target').innerHTML = output;
- testRunner.notifyDone();
- });
- });
- }
- }
-
- window.addEventListener('load', runTest, false);
- </script>
- <style>
- #target {
- height: 380px;
- width: 200px;
- background-color: silver;
- font-family: monospace;
- font-size: 18px;
- }
- </style>
- <meta name="viewport" content="initial-scale=1">
-</head>
-<body>
- <div id="target">
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
- <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
-
- This test requires UIScriptController to run.
- </div>
-</body>
-</html>
Modified: trunk/LayoutTests/fast/events/touch/ios/resources/basic-gestures.js (222586 => 222587)
--- trunk/LayoutTests/fast/events/touch/ios/resources/basic-gestures.js 2017-09-27 23:58:33 UTC (rev 222586)
+++ trunk/LayoutTests/fast/events/touch/ios/resources/basic-gestures.js 2017-09-28 00:07:12 UTC (rev 222587)
@@ -8,14 +8,6 @@
})();`
}
-// We should switch to this method in all tests, as it is more clear what is being done.
-// The original helper function should not be used
-function touchAndDragFromPointToPoint(startX, startY, endX, endY)
-{
- return dragFromPointToPoint(startX, startY, endX, endY);
-}
-
-
function dragFromPointToPoint(startX, startY, endX, endY)
{
return `
@@ -60,94 +52,3 @@
uiController.uiScriptComplete();
})();`
}
-
-function pressAndHoldAtPoint(X, Y)
-{
- return `
- (function() {
- var eventStream = {
- events : [
- {
- interpolate : "linear",
- timestep: 0.1,
- coordinateSpace : "content",
- startEvent : {
- inputType : "hand",
- timeOffset : 0,
- touches : [
- {
- inputType : "finger",
- phase : "began",
- id : 1,
- x : ${X},
- y : ${Y},
- pressure : 0
- }
- ]
- },
- endEvent : {
- inputType : "hand",
- timeOffset : 2.0,
- touches : [
- {
- inputType : "finger",
- phase : "moved",
- id : 1,
- x : ${X},
- y : ${Y},
- pressure : 0
- }
- ]
- }
- }]};
-
- uiController.sendEventStream(JSON.stringify(eventStream), function() {});
- uiController.uiScriptComplete();
- })();`
-}
-
-
-function continueTouchAndDragFromPointToPoint(startX, startY, endX, endY)
-{
- return `
- (function() {
- var eventStream = {
- events : [
- {
- interpolate : "linear",
- timestep: 0.1,
- coordinateSpace : "content",
- startEvent : {
- inputType : "hand",
- timeOffset : 0,
- touches : [
- {
- inputType : "finger",
- phase : "moved",
- id : 1,
- x : ${startX},
- y : ${startY},
- pressure : 0
- }
- ]
- },
- endEvent : {
- inputType : "hand",
- timeOffset : 0.5,
- touches : [
- {
- inputType : "finger",
- phase : "moved",
- id : 1,
- x : ${endX},
- y : ${endY},
- pressure : 0
- }
- ]
- }
- }]};
-
- uiController.sendEventStream(JSON.stringify(eventStream), function() {});
- uiController.uiScriptComplete();
- })();`
-}