| Index: LayoutTests/editing/undo/undo-forward-delete-boundary.html
|
| diff --git a/LayoutTests/editing/undo/undo-forward-delete-boundary.html b/LayoutTests/editing/undo/undo-forward-delete-boundary.html
|
| index 427197e2b3327464dfb5dd9fed4522cc89cbfd62..75dd34b2554a14b0eb235a816a299fffe6296991 100644
|
| --- a/LayoutTests/editing/undo/undo-forward-delete-boundary.html
|
| +++ b/LayoutTests/editing/undo/undo-forward-delete-boundary.html
|
| @@ -4,17 +4,17 @@
|
| <div id="container">
|
| <p id="description"></p>
|
| <p>To test manually, place the cursor before 'w' of 'word' and delete it completely character by character. Do ctrl+z. On Mac, 'word' should be selected. On other platforms 'word' should not be selected and the cursor should be placed before 'w' of 'word'.</p>
|
| -<div id="test" style="border: 2px solid red;" contenteditable>This wo<b>rd </b>should be selected.</div>
|
| +<div id="test" style="border: 2px solid red;" contenteditable>This wo<b>rd </b>should be selected only on mac.</div>
|
| </div>
|
| <div id="console"></div>
|
| <script src="../../fast/js/resources/js-test-pre.js"></script>
|
| <script>
|
| description('Verifies the selection behavior on undoing a text deletion.');
|
| -var sampleHTML = 'This wo<b>rd </b>should be selected.';
|
| +var sampleHTML = 'This wo<b>rd </b>should be selected only on mac.';
|
| var selectionNode = document.getElementById('test').firstChild; // Text node 'This wo'
|
| var selectionOffset = selectionNode.data.indexOf(' ') + 1;
|
| -var endNode = document.getElementById('test').childNodes[1].firstChild; // Text node 'rd '
|
| -var endOffset = endNode.length - 1;
|
| +var endNodeMac = document.getElementById('test').childNodes[1].firstChild; // Text node 'rd '
|
| +var endOffsetMac = endNodeMac.length - 1;
|
| var selection = window.getSelection();
|
|
|
| function $(id) { return document.getElementById(id); }
|
| @@ -37,10 +37,10 @@ function undoTest(platform, expectedStartNode, expectedStartOffset, expectedEndN
|
| }
|
|
|
| if (window.internals) {
|
| - undoTest('mac', selectionNode, selectionOffset, endNode, endOffset, 'word');
|
| - undoTest('win', selectionNode, selectionOffset, endNode, endOffset, 'word');
|
| - undoTest('unix', selectionNode, selectionOffset, endNode, endOffset, 'word');
|
| - undoTest('android', selectionNode, selectionOffset, endNode, endOffset, 'word');
|
| + undoTest('mac', selectionNode, selectionOffset, endNodeMac, endOffsetMac, 'word');
|
| + undoTest('win', selectionNode, selectionOffset, selectionNode, selectionOffset, '');
|
| + undoTest('unix', selectionNode, selectionOffset, selectionNode, selectionOffset, '');
|
| + undoTest('android', selectionNode, selectionOffset, selectionNode, selectionOffset, '');
|
| }
|
| if (window.testRunner)
|
| document.getElementById('container').outerHTML = '';
|
|
|