Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/spelling/mixed_paste.html |
| diff --git a/third_party/WebKit/LayoutTests/editing/spelling/mixed_paste.html b/third_party/WebKit/LayoutTests/editing/spelling/mixed_paste.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fa78a6a376b47226a7414fe3dafe87d3313b2319 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/editing/spelling/mixed_paste.html |
| @@ -0,0 +1,29 @@ |
| +<!doctype html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../assert_selection.js"></script> |
| +<script src="spellcheck_test.js"></script> |
| +<script> |
| +spellcheck_test( |
| + '<div contenteditable>|</div>', |
| + document => { |
| + document.getSelection().setClipboardData( |
| + '<img src="../resources/abe.png"> zz zz.'); |
| + document.execCommand('paste'); |
| + }, |
| + '<div contenteditable><img src="../resources/abe.png"> _zz_ _zz_.</div>', |
| + 'Mark misspelled words after pasting mixed content of image and text.'); |
| + |
| +// Create HTML longer than the spellchecker's chunk size 16384. |
| +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.
|
| +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.
|
| +spellcheck_test( |
| + '<div contenteditable>|</div>', |
| + document => { |
| + document.getSelection().setClipboardData(longHTML); |
| + document.execCommand('paste'); |
| + }, |
| + '<div contenteditable>' + expectedHTML + '</div>', |
| + 'Mark misspelled word after pasting mixed content of image and long text.'); |
| +</script> |
| + |