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

Unified Diff: LayoutTests/editing/text-iterator/first-letter-word-boundary.html

Issue 7696023: Merge 93347 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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/text-iterator/first-letter-word-boundary.html
===================================================================
--- LayoutTests/editing/text-iterator/first-letter-word-boundary.html (revision 93498)
+++ LayoutTests/editing/text-iterator/first-letter-word-boundary.html (working copy)
@@ -20,7 +20,8 @@
layoutTestController.dumpAsText();
function runTest(actor, expectedOffset) {
- var action = actor() + ' put caret at offset ';
+ window.getSelection().setPosition(test.firstChild, 4);
+ var action = actor() + ' from offset ' + 4 + ' put caret at offset ';
var startOffset = window.getSelection().getRangeAt(0).startOffset;
action += startOffset;
if (startOffset == expectedOffset)
@@ -31,16 +32,15 @@
var test = document.getElementById('test');
var console = document.getElementById('console');
-window.getSelection().setPosition(test, 0);
console.innerHTML += 'white-space: normal;\n';
runTest(function () {window.getSelection().modify('move', 'forward', 'word'); return 'moving forward by word';}, 6);
-runTest(function () {window.getSelection().modify('move', 'backward', 'word'); return 'moving backward by word';}, 0);
+runTest(function () {window.getSelection().modify('move', 'backward', 'word'); return 'moving backward by word';}, 1);
console.innerHTML += 'white-space: pre;\n';
test.style.whiteSpace = 'pre';
runTest(function () {window.getSelection().modify('move', 'forward', 'word'); return 'moving forward by word';}, 6);
-runTest(function () {window.getSelection().modify('move', 'backward', 'word'); return 'moving backward by word';}, 0);
+runTest(function () {window.getSelection().modify('move', 'backward', 'word'); return 'moving backward by word';}, 1);
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698