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

Unified Diff: third_party/WebKit/LayoutTests/editing/deleting/delete_at_paragraph_boundaries.html

Issue 2255063002: Convert editing/deleting/delete-at-paragraph-boundaries-00[1-5].html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-18T13:13:01 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
Index: third_party/WebKit/LayoutTests/editing/deleting/delete_at_paragraph_boundaries.html
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete_at_paragraph_boundaries.html b/third_party/WebKit/LayoutTests/editing/deleting/delete_at_paragraph_boundaries.html
new file mode 100644
index 0000000000000000000000000000000000000000..bdb4b5b947e018335ab2b38bf98e91e3950ead74
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/deleting/delete_at_paragraph_boundaries.html
@@ -0,0 +1,87 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<p>A</p><p><br></p><p>^B|</p><p><br></p>',
Xiaocheng 2016/08/18 06:57:00 The initial selection should be anchored before th
yosin_UTC9 2016/08/18 08:58:42 Done.
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<p>A</p><p><br></p><p>|<br></p><p><br></p>',
Xiaocheng 2016/08/18 06:57:00 The second <p> should be gone.
yosin_UTC9 2016/08/18 08:58:42 Done.
+ '</div>',
+ ].join('')),
+ 'Deleting when a selection starts in a blank line created by a block with a BR placeholder in it and extends to the end of a block.');
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<p>A</p><br><p>^B|</p><p><br></p>',
Xiaocheng 2016/08/18 06:57:00 The initial selection should be anchored before th
yosin_UTC9 2016/08/18 08:58:42 Done
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<p>A</p><br><p>|<br></p><p><br></p>',
Xiaocheng 2016/08/18 06:57:00 Should be '<p>A</p>|<br><p><br></p>'
yosin_UTC9 2016/08/18 08:58:42 Done.
+ '</div>',
+ ].join('')),
+ 'Deleting when a selection starts in a blank line created by a BR element and extends to the end of a block.');
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<p>A</p><p><br></p><p>^B|C</p>',
Xiaocheng 2016/08/18 06:57:00 Should be anchored before the first <br>. The sam
yosin_UTC9 2016/08/18 08:58:42 Done
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div><p>A</p><p><br></p><p>|C</p></div>',
+ '</div>',
+ ].join('')),
+ 'Deleting when a selection starts in a blank line created by a block with a BR placeholder in it and extends to a character that is not at the end of a block. This ensures that some of our "special-case" code does not run for this case');
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<p>A</p><br><p>^B|C</p>',
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div><p>A</p><br><p>|C</p></div>',
+ '</div>',
+ ].join('')),
+ 'Deleting when a selection starts in a blank line created by a BR element and extends to a character that is not at the end of a block. This ensures that some of our "special-case" code does not run for this case.');
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<p>A</p><br><p>^B</p>|<br>',
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<p>A</p><br><p>|<br></p>',
+ '</div>',
+ '</div>',
+ ].join('')),
+ 'Deleting when a selection starts in a blank line created by a BR element and extends to the end of the document.');
+</script>

Powered by Google App Engine
This is Rietveld 408576698