WebKit Bugzilla
Attachment 339153 Details for
Bug 185144
: Add tests for selection in content editable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185144-20180430151716.patch (text/plain), 56.46 KB, created by
Megan Gardner
on 2018-04-30 15:17:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-04-30 15:17:17 PDT
Size:
56.46 KB
patch
obsolete
>Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 231171) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,29 @@ >+2018-04-30 Megan Gardner <megan_gardner@apple.com> >+ >+ Add tests for selection in content editable >+ https://bugs.webkit.org/show_bug.cgi?id=185144 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Tests that should cover selection in content editable, both with and without a keyboard present. Also fixing two tests that had errors. >+ >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text-expected.txt: Added. >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html: Added. >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text-expected.txt: Added. >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html: Added. >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text-expected.txt: Added. >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html: Added. >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text-expected.txt: Added. >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html: Added. >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text-expected.txt: Added. >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html: Added. >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text-expected.txt: Added. >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html: Added. >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text-expected.txt: Added. >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html: Added. >+ * fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html: >+ * fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html: >+ > 2018-04-30 Wenson Hsieh <wenson_hsieh@apple.com> > > [Extra zoom mode] Respect the existing shrink-to-fit attribute instead of using min-device-width >Index: LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text-expected.txt >=================================================================== >--- LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text-expected.txt (nonexistent) >+++ LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text-expected.txt (working copy) >@@ -0,0 +1,8 @@ >+PASS: Has Caret Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+ >Index: LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html (nonexistent) >+++ LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html (working copy) >@@ -0,0 +1,132 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <script src="../../../../resources/basic-gestures.js"></script> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ async function runTest() >+ { >+ if (!testRunner.runUIScript) >+ return; >+ >+ var output = ''; >+ var editableTargetRect = document.getElementById('editable').getBoundingClientRect(); >+ var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); >+ var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); >+ var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >+ var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ >+ var tapPointX = editableTargetRect.x + editableTargetRect.width / 2; >+ var tapPointY = editableTargetRect.y + editableTargetRect.height / 2; >+ var doubleTapPointX = firstTargetRect.x + firstTargetRect.width / 2; >+ var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >+ var dragY = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var dragX = firstTargetRect.x + firstTargetRect.width; >+ var dragY2 = secondTargetRect.y + secondTargetRect.height + noneditableToEditableOffset; >+ var dragY3 = thirdTargetRect.y + thirdTargetRect.height + noneditableToEditableOffset; >+ var dragY4 = firstTargetRect.y - firstTargetRect.height + noneditableToEditableOffset; >+ >+ await tapAtPoint(tapPointX, tapPointY); >+ if (document.getSelection().type == "Caret") >+ output += 'PASS: Has Caret Selection'; >+ else >+ output += 'FAIL: failed to activate caret as a result of a tap. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await didShowKeyboard(); >+ >+ await doubleTapAtPoint(doubleTapPointX, doubleTapPointY); >+ if (document.getSelection().toString() == "sed") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select a word as a result of a long press. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY2); >+ if (document.getSelection().toString() == "sed do eiusmod tempor incididun") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY3); >+ if (document.getSelection().toString() == "sed do eiusmod tempor incididunt ut labore et dolore ma") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY3, dragX, dragY2); >+ if (document.getSelection().toString() == "sed do eiusmod tempor incididun") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY); >+ if (document.getSelection().toString() == "sed") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ var result = await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY4); >+ if (document.getSelection().toString() == "s") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to reduce selection to a single character by dragging up. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ output += result; >+ >+ var noneditableElement = document.getElementById('noneditable'); >+ noneditableElement.parentNode.removeChild(noneditableElement); >+ var editableElement = document.getElementById('editable'); >+ editableElement.parentNode.removeChild(editableElement); >+ document.getElementById('target').innerHTML = output; >+ testRunner.notifyDone(); >+ } >+ >+ window.addEventListener('load', runTest, false); >+ </script> >+ <style> >+ #noneditable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #editable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #target { >+ height: 50px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ </style> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+</head> >+<body> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, <span id="firstSelection">sed</span> do eiusmod tempor incididun<span id="secondSelection"></span>t ut labore et dolore mag<span id="thirdSelection"></span>na aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="target"> >+ This test requires UIScriptController to run. >+ </div> >+</body> >+</html> >Index: LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text-expected.txt >=================================================================== >--- LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text-expected.txt (nonexistent) >+++ LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text-expected.txt (working copy) >@@ -0,0 +1,8 @@ >+PASS: Has Caret Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+ >Index: LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html (nonexistent) >+++ LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html (working copy) >@@ -0,0 +1,132 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <script src="../../../../resources/basic-gestures.js"></script> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ async function runTest() >+ { >+ if (!testRunner.runUIScript) >+ return; >+ >+ var output = ''; >+ var editableTargetRect = document.getElementById('editable').getBoundingClientRect(); >+ var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); >+ var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); >+ var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >+ var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ >+ var tapPointX = editableTargetRect.x + editableTargetRect.width / 2; >+ var tapPointY = editableTargetRect.y + editableTargetRect.height / 2; >+ var doubleTapPointX = firstTargetRect.x + firstTargetRect.width / 2; >+ var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >+ var dragY = firstTargetRect.y + noneditableToEditableOffset; >+ var dragX = firstTargetRect.x; >+ var dragX2 = secondTargetRect.x; >+ var dragX3 = thirdTargetRect.x; >+ var dragX4 = firstTargetRect.x + firstTargetRect.width; >+ >+ await tapAtPoint(tapPointX, tapPointY); >+ if (document.getSelection().type == "Caret") >+ output += 'PASS: Has Caret Selection'; >+ else >+ output += 'FAIL: failed to activate caret as a result of a tap. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await didShowKeyboard(); >+ >+ await doubleTapAtPoint(doubleTapPointX, doubleTapPointY); >+ if (document.getSelection().toString() == "magna") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select a word as a result of a long press. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY, dragX2, dragY); >+ if (document.getSelection().toString() == "aliqua magna") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX2, dragY, dragX3, dragY); >+ if (document.getSelection().toString() == "dolore aliqua magna") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX3, dragY, dragX2, dragY); >+ if (document.getSelection().toString() == "aliqua magna") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX2, dragY, dragX, dragY); >+ if (document.getSelection().toString() == "magna") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ var result = await touchAndDragFromPointToPoint(dragX, dragY, dragX4, dragY); >+ if (document.getSelection().toString() == "a") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to reduce selection to a single character by dragging right. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ output += result; >+ >+ var noneditableElement = document.getElementById('noneditable'); >+ noneditableElement.parentNode.removeChild(noneditableElement); >+ var editableElement = document.getElementById('editable'); >+ editableElement.parentNode.removeChild(editableElement); >+ document.getElementById('target').innerHTML = output; >+ testRunner.notifyDone(); >+ } >+ >+ window.addEventListener('load', runTest, false); >+ </script> >+ <style> >+ #noneditable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #editable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #target { >+ height: 50px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ </style> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+</head> >+<body> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et <span id="thirdSelection"></span>dolore <span id="secondSelection"></span>aliqua <span id="firstSelection">magna</span>. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore aliqua magna. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="target"> >+ This test requires UIScriptController to run. >+ </div> >+</body> >+</html> >Index: LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text-expected.txt >=================================================================== >--- LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text-expected.txt (nonexistent) >+++ LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text-expected.txt (working copy) >@@ -0,0 +1,8 @@ >+PASS: Has Caret Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+ >Index: LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html (nonexistent) >+++ LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html (working copy) >@@ -0,0 +1,132 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <script src="../../../../resources/basic-gestures.js"></script> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ async function runTest() >+ { >+ if (!testRunner.runUIScript) >+ return; >+ >+ var output = ''; >+ var editableTargetRect = document.getElementById('editable').getBoundingClientRect(); >+ var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); >+ var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); >+ var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >+ var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ >+ var tapPointX = editableTargetRect.x + editableTargetRect.width / 2; >+ var tapPointY = editableTargetRect.y + editableTargetRect.height / 2; >+ var doubleTapPointX = firstTargetRect.x + firstTargetRect.width / 2; >+ var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >+ var dragY = firstTargetRect.y + noneditableToEditableOffset; >+ var dragX = firstTargetRect.x; >+ var dragY2 = secondTargetRect.y + noneditableToEditableOffset; >+ var dragY3 = thirdTargetRect.y + noneditableToEditableOffset; >+ var dragY4 = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ >+ await tapAtPoint(tapPointX, tapPointY); >+ if (document.getSelection().type == "Caret") >+ output += 'PASS: Has Caret Selection'; >+ else >+ output += 'FAIL: failed to activate caret as a result of a tap. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await didShowKeyboard(); >+ >+ await doubleTapAtPoint(doubleTapPointX, doubleTapPointY); >+ if (document.getSelection().toString() == "at") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select a word as a result of a long press. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY2); >+ if (document.getSelection().toString() == "o eiusmod tempor incididunt at") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY3); >+ if (document.getSelection().toString() == " adipiscing elit, sed do eiusmod tempor incididunt at") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY3, dragX, dragY2); >+ if (document.getSelection().toString() == "o eiusmod tempor incididunt at") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY); >+ if (document.getSelection().toString() == "at") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ var result = await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY4); >+ if (document.getSelection().toString() == "t") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to reduce selection to a single character by dragging down. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ output += result; >+ >+ var noneditableElement = document.getElementById('noneditable'); >+ noneditableElement.parentNode.removeChild(noneditableElement); >+ var editableElement = document.getElementById('editable'); >+ editableElement.parentNode.removeChild(editableElement); >+ document.getElementById('target').innerHTML = output; >+ testRunner.notifyDone(); >+ } >+ >+ window.addEventListener('load', runTest, false); >+ </script> >+ <style> >+ #noneditable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #editable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #target { >+ height: 50px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ </style> >+ <meta name="viewport" content="initial-scale=1"> >+</head> >+<body> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur<span id="thirdSelection"></span> adipiscing elit, sed d<span id="secondSelection"></span>o eiusmod tempor incididunt <span id="firstSelection">at</span> labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt at labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="target"> >+ This test requires UIScriptController to run. >+ </div> >+</body> >+</html> >Index: LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text-expected.txt >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text-expected.txt (nonexistent) >+++ LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text-expected.txt (working copy) >@@ -0,0 +1,7 @@ >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+ >Index: LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html (nonexistent) >+++ LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html (working copy) >@@ -0,0 +1,121 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <script src="../../../../resources/basic-gestures.js"></script> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ async function runTest() >+ { >+ if (!testRunner.runUIScript) >+ return; >+ >+ var output = ''; >+ var editableTargetRect = document.getElementById('editable').getBoundingClientRect(); >+ var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); >+ var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); >+ var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >+ var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ >+ var pressPointX = firstTargetRect.x + firstTargetRect.width / 2; >+ var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >+ var dragY = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var dragX = firstTargetRect.x + firstTargetRect.width; >+ var dragY2 = secondTargetRect.y + secondTargetRect.height + noneditableToEditableOffset; >+ var dragY3 = thirdTargetRect.y + thirdTargetRect.height + noneditableToEditableOffset; >+ var dragY4 = firstTargetRect.y - firstTargetRect.height + noneditableToEditableOffset; >+ >+ await longPressAtPoint(pressPointX, pressPointY); >+ if (document.getSelection().toString() == "sed") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select a word as a result of a long press. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY2); >+ if (document.getSelection().toString() == "sed do eiusmod tempor incididun") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY3); >+ if (document.getSelection().toString() == "sed do eiusmod tempor incididunt ut labore et dolore ma") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY3, dragX, dragY2); >+ if (document.getSelection().toString() == "sed do eiusmod tempor incididun") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY); >+ if (document.getSelection().toString() == "sed") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ var result = await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY4); >+ if (document.getSelection().toString() == "s") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to reduce selection to a single character by dragging up. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ output += result; >+ >+ var noneditableElement = document.getElementById('noneditable'); >+ noneditableElement.parentNode.removeChild(noneditableElement); >+ var editableElement = document.getElementById('editable'); >+ editableElement.parentNode.removeChild(editableElement); >+ document.getElementById('target').innerHTML = output; >+ testRunner.notifyDone(); >+ } >+ >+ window.addEventListener('load', runTest, false); >+ </script> >+ <style> >+ #noneditable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #editable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #target { >+ height: 50px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ </style> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+</head> >+<body> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, <span id="firstSelection">sed</span> do eiusmod tempor incididun<span id="secondSelection"></span>t ut labore et dolore mag<span id="thirdSelection"></span>na aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="target"> >+ This test requires UIScriptController to run. >+ </div> >+</body> >+</html> >Index: LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text-expected.txt >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text-expected.txt (nonexistent) >+++ LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text-expected.txt (working copy) >@@ -0,0 +1,7 @@ >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+ >Index: LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html (nonexistent) >+++ LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html (working copy) >@@ -0,0 +1,121 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <script src="../../../../resources/basic-gestures.js"></script> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ async function runTest() >+ { >+ if (!testRunner.runUIScript) >+ return; >+ >+ var output = ''; >+ var editableTargetRect = document.getElementById('editable').getBoundingClientRect(); >+ var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); >+ var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); >+ var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >+ var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ >+ var pressPointX = firstTargetRect.x + firstTargetRect.width / 2; >+ var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >+ var dragY = firstTargetRect.y + noneditableToEditableOffset; >+ var dragX = firstTargetRect.x; >+ var dragX2 = secondTargetRect.x; >+ var dragX3 = thirdTargetRect.x; >+ var dragX4 = firstTargetRect.x + firstTargetRect.width; >+ >+ await longPressAtPoint(pressPointX, pressPointY); >+ if (document.getSelection().toString() == "aliqua") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select a word as a result of a long press. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY, dragX2, dragY); >+ if (document.getSelection().toString() == "magna aliqua") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX2, dragY, dragX3, dragY); >+ if (document.getSelection().toString() == "dolore magna aliqua") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX3, dragY, dragX2, dragY); >+ if (document.getSelection().toString() == "magna aliqua") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX2, dragY, dragX, dragY); >+ if (document.getSelection().toString() == "aliqua") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ var result = await touchAndDragFromPointToPoint(dragX, dragY, dragX4, dragY); >+ if (document.getSelection().toString() == "a") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to reduce selection to a single character by dragging right. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ output += result; >+ >+ var noneditableElement = document.getElementById('noneditable'); >+ noneditableElement.parentNode.removeChild(noneditableElement); >+ var editableElement = document.getElementById('editable'); >+ editableElement.parentNode.removeChild(editableElement); >+ document.getElementById('target').innerHTML = output; >+ testRunner.notifyDone(); >+ } >+ >+ window.addEventListener('load', runTest, false); >+ </script> >+ <style> >+ #noneditable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #editable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #target { >+ height: 50px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ </style> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+</head> >+<body> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et <span id="thirdSelection"></span>dolore <span id="secondSelection"></span>magna <span id="firstSelection">aliqua</span>. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="target"> >+ This test requires UIScriptController to run. >+ </div> >+</body> >+</html> >Index: LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text-expected.txt >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text-expected.txt (nonexistent) >+++ LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text-expected.txt (working copy) >@@ -0,0 +1,7 @@ >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+ >Index: LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html (nonexistent) >+++ LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html (working copy) >@@ -0,0 +1,121 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <script src="../../../../resources/basic-gestures.js"></script> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ async function runTest() >+ { >+ if (!testRunner.runUIScript) >+ return; >+ >+ var output = ''; >+ var editableTargetRect = document.getElementById('editable').getBoundingClientRect(); >+ var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); >+ var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); >+ var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >+ var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ >+ var pressPointX = firstTargetRect.x + firstTargetRect.width / 2; >+ var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >+ var dragY = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var dragX = firstTargetRect.x + firstTargetRect.width; >+ var dragX2 = secondTargetRect.x; >+ var dragX3 = thirdTargetRect.x; >+ var dragX4 = firstTargetRect.x - firstTargetRect.width; >+ >+ await longPressAtPoint(pressPointX, pressPointY); >+ if (document.getSelection().toString() == "magna") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select a word as a result of a long press. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY, dragX2, dragY); >+ if (document.getSelection().toString() == "magna aliqua.") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX2, dragY, dragX3, dragY); >+ if (document.getSelection().toString() == "magna aliqua. Ut") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX3, dragY, dragX2, dragY); >+ if (document.getSelection().toString() == "magna aliqua.") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX2, dragY, dragX, dragY); >+ if (document.getSelection().toString() == "magna") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect word after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ var result = await touchAndDragFromPointToPoint(dragX, dragY, dragX4, dragY); >+ if (document.getSelection().toString() == "m") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to reduce selection to a single character by dragging left. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ output += result; >+ >+ var noneditableElement = document.getElementById('noneditable'); >+ noneditableElement.parentNode.removeChild(noneditableElement); >+ var editableElement = document.getElementById('editable'); >+ editableElement.parentNode.removeChild(editableElement); >+ document.getElementById('target').innerHTML = output; >+ testRunner.notifyDone(); >+ } >+ >+ window.addEventListener('load', runTest, false); >+ </script> >+ <style> >+ #noneditable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #editable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #target { >+ height: 50px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ </style> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+</head> >+<body> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore <span id="firstSelection">magna</span> aliqua.<span id="secondSelection"></span> Ut<span id="thirdSelection"></span> enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="target"> >+ This test requires UIScriptController to run. >+ </div> >+</body> >+</html> >Index: LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text-expected.txt >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text-expected.txt (nonexistent) >+++ LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text-expected.txt (working copy) >@@ -0,0 +1,7 @@ >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+PASS: Correct Selection >+ >Index: LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html (nonexistent) >+++ LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html (working copy) >@@ -0,0 +1,121 @@ >+<!DOCTYPE html> >+ >+<html> >+<head> >+ <script src="../../../../resources/basic-gestures.js"></script> >+ <script> >+ if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+ } >+ >+ async function runTest() >+ { >+ if (!testRunner.runUIScript) >+ return; >+ >+ var output = ''; >+ var editableTargetRect = document.getElementById('editable').getBoundingClientRect(); >+ var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); >+ var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); >+ var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >+ var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ >+ var pressPointX = firstTargetRect.x + firstTargetRect.width / 2; >+ var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >+ var dragY = firstTargetRect.y + noneditableToEditableOffset; >+ var dragX = firstTargetRect.x; >+ var dragY2 = secondTargetRect.y + noneditableToEditableOffset; >+ var dragY3 = thirdTargetRect.y + noneditableToEditableOffset; >+ var dragY4 = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ >+ await longPressAtPoint(pressPointX, pressPointY); >+ if (document.getSelection().toString() == "ut") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select a word as a result of a long press. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY2); >+ if (document.getSelection().toString() == "o eiusmod tempor incididunt ut") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY3); >+ if (document.getSelection().toString() == " adipiscing elit, sed do eiusmod tempor incididunt ut") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY3, dragX, dragY2); >+ if (document.getSelection().toString() == "o eiusmod tempor incididunt ut") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY); >+ if (document.getSelection().toString() == "ut") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ >+ var result = await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY4); >+ if (document.getSelection().toString() == "t") >+ output += 'PASS: Correct Selection'; >+ else >+ output += 'FAIL: failed to reduce selection to a single character by dragging down. Incorrect Selection: ' + document.getSelection().toString(); >+ output += '<br>'; >+ output += result; >+ >+ var noneditableElement = document.getElementById('noneditable'); >+ noneditableElement.parentNode.removeChild(noneditableElement); >+ var editableElement = document.getElementById('editable'); >+ editableElement.parentNode.removeChild(editableElement); >+ document.getElementById('target').innerHTML = output; >+ testRunner.notifyDone(); >+ } >+ >+ window.addEventListener('load', runTest, false); >+ </script> >+ <style> >+ #noneditable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #editable { >+ height: 200px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ #target { >+ height: 50px; >+ width: 300px; >+ background-color: silver; >+ font-family: monospace; >+ font-size: 18px; >+ } >+ </style> >+ <meta name="viewport" content="initial-scale=1"> >+</head> >+<body> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur<span id="thirdSelection"></span> adipiscing elit, sed d<span id="secondSelection"></span>o eiusmod tempor incididunt <span id="firstSelection">ut</span> labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> >+ <div id="target"> >+ This test requires UIScriptController to run. >+ </div> >+</body> >+</html> >Index: LayoutTests/fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html (revision 231160) >+++ LayoutTests/fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html (working copy) >@@ -55,7 +55,7 @@ > output += 'FAIL: failed to deselect word after a drag. Incorrect Selection: ' + document.getSelection().toString(); > output += '<br>'; > >- await(touchAndDragFromPointToPoint(dragX2, dragY, dragX, dragY); >+ await touchAndDragFromPointToPoint(dragX2, dragY, dragX, dragY); > if (document.getSelection().toString() == "magna") > output += 'PASS: Correct Selection'; > else >Index: LayoutTests/fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html >=================================================================== >--- LayoutTests/fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html (revision 231160) >+++ LayoutTests/fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html (working copy) >@@ -28,35 +28,35 @@ > var dragY4 = firstTargetRect.y + firstTargetRect.height; > > await longPressAtPoint(pressPointX, pressPointY); >- if (document.getSelection().toString() == "Ut") >+ if (document.getSelection().toString() == "ut") > output += 'PASS: Correct Selection'; > else > output += 'FAIL: failed to select a word as a result of a long press. Incorrect Selection: ' + document.getSelection().toString(); > output += '<br>'; > > await touchAndDragFromPointToPoint(dragX, dragY, dragX, dragY2); >- if (document.getSelection().toString() == "e et dolore magna aliqua. Ut") >+ if (document.getSelection().toString() == "o eiusmod tempor incididunt ut") > output += 'PASS: Correct Selection'; > else > output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); > output += '<br>'; > > await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY3); >- if (document.getSelection().toString() == "mod tempor incididunt ut labore et dolore magna aliqua. Ut") >+ if (document.getSelection().toString() == " adipiscing elit, sed do eiusmod tempor incididunt ut") > output += 'PASS: Correct Selection'; > else > output += 'FAIL: failed to select additional line after a drag. Incorrect Selection: ' + document.getSelection().toString(); > output += '<br>'; > > await touchAndDragFromPointToPoint(dragX, dragY3, dragX, dragY2); >- if (document.getSelection().toString() == "e et dolore magna aliqua. Ut") >+ if (document.getSelection().toString() == "o eiusmod tempor incididunt ut") > output += 'PASS: Correct Selection'; > else > output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString(); > output += '<br>'; > > await touchAndDragFromPointToPoint(dragX, dragY2, dragX, dragY); >- if (document.getSelection().toString() == "Ut") >+ if (document.getSelection().toString() == "ut") > output += 'PASS: Correct Selection'; > else > output += 'FAIL: failed to deselect line after a drag. Incorrect Selection: ' + document.getSelection().toString();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
wenson_hsieh
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185144
: 339153