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

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

Issue 2287283002: Convert editing/inserting/paragraph-separator-0[123].html to use w3c test harness (Closed)
Patch Set: 2016-08-30T13:39:16 Created 4 years, 4 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/inserting/paragraph-separator-01.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_paragraph_separator.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert_paragraph_separator.html b/third_party/WebKit/LayoutTests/editing/inserting/insert_paragraph_separator.html
new file mode 100644
index 0000000000000000000000000000000000000000..6bb06e368573b34945b3de7cb7fbc70b025ec78c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/inserting/insert_paragraph_separator.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<div id="log"></div>
+<script>
+test(() => assert_selection(
+ '<div contenteditable>foo<br><div>|bar</div></div>',
+ 'insertParagraph',
+ '<div contenteditable>foo<br><div><br></div><div>|bar</div></div>'),
+ 'insert a paragraph separator after BR and before character');
+
+test(() => assert_selection(
+ '<div contenteditable>foo<div>|bar</div></div>',
+ 'insertParagraph',
+ '<div contenteditable>foo<div><br></div><div>|bar</div></div>'),
+ 'insert a paragraph separator before character');
+
+// A Test for a bug in the paragraph separator insertion code that would add an
+// extra newline when inserting a paragraph separator at the end of a paragraph
+// in text that preserves newlines. Also, an extraneous space would be added
+// after 'foo'. Only one newline should be added. And there should be no
+// extraneous spaces.
+//
+// It demonstrates a bug: too much padding is left between the new line and the
+// end of the paragraph containing 'foo'.
+test(() => assert_selection(
+ '<div contenteditable><pre>foo\n|bar</pre></div>',
+ 'insertParagraph',
+ '<div contenteditable><pre>foo\n<br></pre><pre>|bar</pre></div>'),
+ 'insert a paragraph separator in PRE');
+</script>
+
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/inserting/paragraph-separator-01.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698