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

Unified Diff: third_party/WebKit/LayoutTests/editing/inserting/insert_html_as_plain_text.html

Issue 2179373002: Convert editing/pasteboard/8145-[1-3].html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-26T15:28:49 Created 4 years, 5 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 | « no previous file | third_party/WebKit/LayoutTests/editing/pasteboard/8145-1.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/inserting/insert_html_as_plain_text.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert_html_as_plain_text.html b/third_party/WebKit/LayoutTests/editing/inserting/insert_html_as_plain_text.html
new file mode 100644
index 0000000000000000000000000000000000000000..d63da1699b81b8c25182e279f94153d07a4c459f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert_html_as_plain_text.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+// See detail in http://wkb.ug/8145
+test(() => assert_selection(
+ '<div contenteditable="plaintext-only">|</div>',
+ 'insertHTML <p style="margin: 0; font: 12px Helvetica">foo <b>bar</b> baz</p>',
+ '<div contenteditable="plaintext-only">foo bar baz|</div>'),
+ 'insert HTML as plain text.');
+
+// Regression by 8145 fix
+test(() => assert_selection(
+ '<div contenteditable>foo<br>|bar<br>baz</div>',
+ 'insertHTML <div>FOO</div>BAR',
+ '<div contenteditable>foo<br><div>FOO</div>BAR|bar<br>baz</div>'),
+ 'insert HTML at start of paragraph.');
+
+// Regression by 8145 fix
+test(() => assert_selection(
+ '<div contenteditable><div>f|oo</div></div>',
+ 'insertHTML <div>bar</div>baz<br class="Apple-interchange-newline">',
+ '<div contenteditable><div>fbar</div>baz<div>|oo</div></div>'),
+ 'interchange-newline is not inserted before DIV');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/pasteboard/8145-1.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698