| Index: LayoutTests/editing/undo/undo-combined-delete-boundary.html
|
| diff --git a/LayoutTests/editing/undo/undo-combined-delete-boundary.html b/LayoutTests/editing/undo/undo-combined-delete-boundary.html
|
| index d66c3a24f0f03b2f9987c629cd37e4f2bbe969ce..63549c2960599fe88fb1552b9ae06dbe2e6e4cfa 100644
|
| --- a/LayoutTests/editing/undo/undo-combined-delete-boundary.html
|
| +++ b/LayoutTests/editing/undo/undo-combined-delete-boundary.html
|
| @@ -4,18 +4,18 @@
|
| <div id="container">
|
| <p id="description"></p>
|
| <p>To test manually, place the cursor after 'o' in 'word' and delete it 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 after 'o' in '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.length;
|
| -var endNode = document.getElementById('test').childNodes[1].firstChild; // Text node 'rd '
|
| -var endOffset = endNode.length - 1;
|
| -var startOffset = selectionNode.data.indexOf(' ')+1;
|
| +var endNodeMac = document.getElementById('test').childNodes[1].firstChild; // Text node 'rd '
|
| +var endOffsetMac = endNodeMac.length - 1;
|
| +var startOffsetMac = selectionNode.data.indexOf(' ')+1;
|
| var selection = window.getSelection();
|
|
|
| function $(id) { return document.getElementById(id); }
|
| @@ -40,10 +40,10 @@ function undoTest(platform, expectedStartNode, expectedStartOffset, expectedEndN
|
| }
|
|
|
| if (window.internals) {
|
| - undoTest('mac', selectionNode, startOffset, endNode, endOffset, 'word');
|
| - undoTest('win', selectionNode, startOffset, endNode, endOffset, 'word');
|
| - undoTest('unix', selectionNode, startOffset, endNode, endOffset, 'word');
|
| - undoTest('android', selectionNode, startOffset, endNode, endOffset, 'word');
|
| + undoTest('mac', selectionNode, startOffsetMac, 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 = '';
|
|
|