Changeset 100887 in webkit
- Timestamp:
- Nov 20, 2011 10:28:06 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r100886 r100887 1 2011-11-20 Shinya Kawanaka <shinyak@google.com> 2 3 [Chromium] Layout test does not return correct misspelling positions if there are multiple misspelled words. 4 https://bugs.webkit.org/show_bug.cgi?id=72655 5 6 Reviewed by Hajime Morita. 7 8 Fixed the calculation of offset, and added test cases having multiple misspelled words. 9 10 * editing/spelling/script-tests/spellcheck-paste.js: 11 Added test cases having multiple misspelled words. 12 (verifyMarker): 13 (tests): 14 * editing/spelling/spellcheck-paste-expected.txt: Recreated. 15 1 16 2011-11-20 Kenichi Ishibashi <bashi@chromium.org> 2 17 -
trunk/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js
r73886 r100887 26 26 testRoot.appendChild(testSourceDecorated); 27 27 28 var testSourceMulti = document.createElement("div"); 29 testSourceMulti.innerHTML = "zz zz zz"; 30 testRoot.appendChild(testSourceMulti); 31 28 32 var sel = window.getSelection(); 29 33 … … 46 50 sel.selectAllChildren(node); 47 51 } 48 return layoutTestController.hasSpellingMarker(expectedMarked[0], expectedMarked[1]); 52 53 var ok = true; 54 for (var i = 0; ok && i < expectedMarked.length; ++i) 55 ok = layoutTestController.hasSpellingMarker(expectedMarked[i][0], expectedMarked[i][1]); 56 return ok; 49 57 } 50 58 … … 88 96 layoutTestController.setAsynchronousSpellCheckingEnabled(true); 89 97 90 tests.push(function() { pasteAndVerify(testSourcePlain, testInput, [0, 3]); }); 91 tests.push(function() { pasteAndVerify(testSourceDecorated, testInput, [0, 3]); }); 92 tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [0, 3]); }); 93 tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [0, 3]); }); 94 tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [0, 3]); }); 95 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [0, 2]); }); // To check "fo" part of foo. 98 tests.push(function() { pasteAndVerify(testSourcePlain, testInput, [[0, 3]]); }); 99 tests.push(function() { pasteAndVerify(testSourceDecorated, testInput, [[0, 3]]); }); 100 tests.push(function() { pasteAndVerify(testSourceMulti, testInput, [[0, 2], [3, 2]]); }); 101 tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [[0, 3]]); }); 102 tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [[0, 3]]); }); 103 tests.push(function() { pasteAndVerify(testSourceMulti, testTextArea, [[0, 2], [3, 2]]); }); 104 tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [[0, 3]]); }); 105 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [[0, 2]]); }); // To check "fo" part of foo. 106 tests.push(function() { pasteAndVerify(testSourceMulti, testEditable, [[0, 2], [3, 2]]); }); 96 107 done(); 97 108 -
trunk/LayoutTests/editing/spelling/spellcheck-paste-expected.txt
r73886 r100887 9 9 PASS INPUT has a marker on 'foo bar' 10 10 PASS INPUT has a marker on 'fo<b>o ba</b>r' 11 PASS INPUT has a marker on 'zz zz zz' 11 12 PASS TEXTAREA has a marker on 'foo bar' 12 13 PASS TEXTAREA has a marker on 'fo<b>o ba</b>r' 14 PASS TEXTAREA has a marker on 'zz zz zz' 13 15 PASS DIV has a marker on 'foo bar' 14 16 PASS DIV has a marker on 'fo<b>o ba</b>r' 17 PASS DIV has a marker on 'zz zz zz' 15 18 -
trunk/Tools/ChangeLog
r100875 r100887 1 2011-11-20 Shinya Kawanaka <shinyak@google.com> 2 3 [Chromium] Layout test does not return correct misspelling positions if there are multiple misspelled words. 4 https://bugs.webkit.org/show_bug.cgi?id=72655 5 6 Reviewed by Hajime Morita. 7 8 Fixed the calculation of offset. 9 10 * DumpRenderTree/chromium/WebViewHost.cpp: 11 (WebViewHost::finishLastTextCheck): 12 1 13 2011-11-20 Ojan Vafai <ojan@chromium.org> 2 14 -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
r100821 r100887 459 459 results.append(WebTextCheckingResult(WebTextCheckingResult::ErrorSpelling, offset + misspelledPosition, misspelledLength)); 460 460 text = text.substring(misspelledPosition + misspelledLength); 461 offset += misspelledPosition ;461 offset += misspelledPosition + misspelledLength; 462 462 } 463 463
Note: See TracChangeset
for help on using the changeset viewer.