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

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/mixed_paste.html

Issue 2449743002: Convert editing/spelling/mixed-paste-*.html with spellcheck_test (Closed)
Patch Set: Wed Oct 26 14:57:43 JST 2016 Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2ef4ee5646f5ea7f158504e3d283bfd28f1ebf53
--- /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.
+const longHTML = `<img src="../resources/abe.png"> zz${' ah'.repeat(5461)}`;
+const expectedHTML = `<img src="../resources/abe.png"> _zz_${' ah'.repeat(5461)}`;
+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>
+
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698