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

Unified Diff: LayoutTests/editing/undo/undo-forward-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-forward-delete.html
diff --git a/LayoutTests/editing/undo/undo-forward-delete.html b/LayoutTests/editing/undo/undo-forward-delete.html
index 93038c95ee84e46b0254373ce0959c63166c805b..2822001176bd19329d8e180055f5459d030141d1 100644
--- a/LayoutTests/editing/undo/undo-forward-delete.html
+++ b/LayoutTests/editing/undo/undo-forward-delete.html
@@ -4,7 +4,7 @@
<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 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(' ') + 1;
-var endOffset = selectionNode.data.indexOf('d') + 1;
+var endOffsetMac = selectionNode.data.indexOf('d') + 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-delete-expected.txt ('k') | LayoutTests/editing/undo/undo-forward-delete-boundary.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698