 Chromium Code Reviews
 Chromium Code Reviews Issue 2449743002:
  Convert editing/spelling/mixed-paste-*.html with spellcheck_test  (Closed)
    
  
    Issue 2449743002:
  Convert editing/spelling/mixed-paste-*.html with spellcheck_test  (Closed) 
  | OLD | NEW | 
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <script src="../assert_selection.js"></script> | |
| 5 <script src="spellcheck_test.js"></script> | |
| 6 <script> | |
| 7 spellcheck_test( | |
| 8 '<div contenteditable>|</div>', | |
| 9 document => { | |
| 10 document.getSelection().setClipboardData( | |
| 11 '<img src="../resources/abe.png"> zz zz.'); | |
| 12 document.execCommand('paste'); | |
| 13 }, | |
| 14 '<div contenteditable><img src="../resources/abe.png"> _zz_ _zz_.</div>', | |
| 15 'Mark misspelled words after pasting mixed content of image and text.'); | |
| 16 | |
| 17 // Create HTML longer than the spellchecker's chunk size 16384. | |
| 18 var longHTML = '<img src="../resources/abe.png"> zz' + ' ah'.repeat(5461); | |
| 
yosin_UTC9
2016/10/26 03:43:20
s/var/const/
 
Xiaocheng
2016/10/26 05:59:04
Done.
 | |
| 19 var expectedHTML = '<img src="../resources/abe.png"> _zz_' + ' ah'.repeat(5461); | |
| 
yosin_UTC9
2016/10/26 03:43:20
s/var/const/
(^_^;) about repeat()
BTW, you can u
 
Xiaocheng
2016/10/26 05:59:04
Done.
 | |
| 20 spellcheck_test( | |
| 21 '<div contenteditable>|</div>', | |
| 22 document => { | |
| 23 document.getSelection().setClipboardData(longHTML); | |
| 24 document.execCommand('paste'); | |
| 25 }, | |
| 26 '<div contenteditable>' + expectedHTML + '</div>', | |
| 27 'Mark misspelled word after pasting mixed content of image and long text.'); | |
| 28 </script> | |
| 29 | |
| OLD | NEW |