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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/mixed_paste.html

Issue 2455043002: Switch spelling marker from '_' to '#' in spellcheck_test (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script> 4 <script src="../assert_selection.js"></script>
5 <script src="spellcheck_test.js"></script> 5 <script src="spellcheck_test.js"></script>
6 <script> 6 <script>
7 spellcheck_test( 7 spellcheck_test(
8 '<div contenteditable>|</div>', 8 '<div contenteditable>|</div>',
9 document => { 9 document => {
10 document.getSelection().setClipboardData( 10 document.getSelection().setClipboardData(
11 '<img src="../resources/abe.png"> zz zz.'); 11 '<img src="../resources/abe.png"> zz zz.');
12 document.execCommand('paste'); 12 document.execCommand('paste');
13 }, 13 },
14 '<div contenteditable><img src="../resources/abe.png"> _zz_ _zz_.</div>', 14 '<div contenteditable><img src="../resources/abe.png"> #zz# #zz#.</div>',
15 'Mark misspelled words after pasting mixed content of image and text.'); 15 'Mark misspelled words after pasting mixed content of image and text.');
16 16
17 // Create HTML longer than the spellchecker's chunk size 16384. 17 // Create HTML longer than the spellchecker's chunk size 16384.
18 const longHTML = `<img src="../resources/abe.png"> zz${' ah'.repeat(5461)}`; 18 const longHTML = `<img src="../resources/abe.png"> zz${' ah'.repeat(5461)}`;
19 const expectedHTML = `<img src="../resources/abe.png"> _zz_${' ah'.repeat(5461)} `; 19 const expectedHTML = `<img src="../resources/abe.png"> #zz#${' ah'.repeat(5461)} `;
20 spellcheck_test( 20 spellcheck_test(
21 '<div contenteditable>|</div>', 21 '<div contenteditable>|</div>',
22 document => { 22 document => {
23 document.getSelection().setClipboardData(longHTML); 23 document.getSelection().setClipboardData(longHTML);
24 document.execCommand('paste'); 24 document.execCommand('paste');
25 }, 25 },
26 '<div contenteditable>' + expectedHTML + '</div>', 26 '<div contenteditable>' + expectedHTML + '</div>',
27 'Mark misspelled word after pasting mixed content of image and long text.'); 27 'Mark misspelled word after pasting mixed content of image and long text.');
28 </script> 28 </script>
29 29
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698