Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: LayoutTests/editing/undo/undo-delete.html

Issue 43143003: Undo of delete/forward-delete of text should not select the deleted text on non-mac platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Function name modified and Tests/Expectations updated Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/editing/undo/undo-delete.html
diff --git a/LayoutTests/editing/undo/undo-delete.html b/LayoutTests/editing/undo/undo-delete.html
index 6c99881146c5892fb25c19a790fc9985a2c9abbb..ba6fdce72e6d6cae51ac3c0c5108e5c094dd9ee8 100644
--- a/LayoutTests/editing/undo/undo-delete.html
+++ b/LayoutTests/editing/undo/undo-delete.html
@@ -4,7 +4,7 @@
<div id="container">
<p id="description"></p>
<p>To test manually, place the cursor at the end 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 at the end of 'word'.</p>
-<div id="test" style="border: 2px solid red;" contenteditable>This word should be selected.</div>
+<div id="test" style="border: 2px solid red;" contenteditable>This word should be selected only on mac.</div>
</div>
<div id="console"></div>
<script src="../../fast/js/resources/js-test-pre.js"></script>
@@ -12,7 +12,7 @@
description('Verifies the selection behavior on undoing a text deletion.');
var selectionNode = document.getElementById('test').firstChild;
var selectionOffset = selectionNode.data.indexOf('d') + 1;
-var endOffset = selectionNode.data.indexOf(' ') + 1;
+var endOffsetMac = selectionNode.data.indexOf(' ') + 1;
var selection = window.getSelection();
function undoTest(platform, expectedStartNode, expectedStartOffset, expectedEndNode, expectedEndOffset, selectedText) {
@@ -32,10 +32,10 @@ function undoTest(platform, expectedStartNode, expectedStartOffset, expectedEndN
}
if (window.internals) {
- undoTest('mac', selectionNode, selectionOffset, selectionNode, endOffset, 'word');
- undoTest('win', selectionNode, selectionOffset, selectionNode, endOffset, 'word');
- undoTest('unix', selectionNode, selectionOffset, selectionNode, endOffset, 'word');
- undoTest('android', selectionNode, selectionOffset, selectionNode, endOffset, 'word');
+ undoTest('mac', selectionNode, selectionOffset, selectionNode, 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 = '';
« no previous file with comments | « LayoutTests/editing/undo/undo-combined-delete-expected.txt ('k') | LayoutTests/editing/undo/undo-delete-boundary.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698