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

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

Issue 2255073002: Convert editing/deleting/delete-block-merge-contents-01[2-7].html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-18T13:59:29 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_block_merge_whitespace.html
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete_block_merge_whitespace.html b/third_party/WebKit/LayoutTests/editing/deleting/delete_block_merge_whitespace.html
new file mode 100644
index 0000000000000000000000000000000000000000..bd945321f01bb7aa0599ec1fbfa36a129f772e78
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/deleting/delete_block_merge_whitespace.html
@@ -0,0 +1,119 @@
+<!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>',
+ '<div>This is ^some text.</div>',
+ '<div>This is| some text.</div>',
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div>',
+ 'This is |\u{00A0}some text.',
+ '</div>',
+ '</div>',
+ ].join('')),
+ 'Select without surrounding whitespace');
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<div>This is ^some text.</div>',
+ '<div>This is |some text.</div>',
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div>',
+ 'This is |some text.',
+ '</div>',
+ '</div>',
+ ].join('')),
+ 'Select with trailing whitespace');
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<div>This is^ some text.</div>',
+ '<div>This is| some text.</div>',
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div>',
+ 'This is| some text.',
+ '</div>',
+ '</div>',
+ ].join('')),
+ 'Select with surrounding whitespace');
Xiaocheng 2016/08/18 08:03:45 nit: should be with leading whitespace
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<div>This is^ some text.</div>',
+ '<div>This is| some text.</div>',
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div>',
+ 'This is| some text.',
+ '</div>',
+ '</div>',
+ ].join('')),
+ 'Select leading multiple whitespaces');
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<div>This is^ some text.</div>',
+ '<div>This is| some text.</div>',
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div>',
+ 'This is| some text.',
+ '</div>',
+ '</div>',
+ ].join('')),
+ 'Squash whitespaces around selection');
+
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<div>',
+ '<div>This is ^some text.</div>',
+ '<div>This is| some text.</div>',
+ '</div>',
+ '</div>',
+ ].join(''),
+ 'delete',
+ [
+ '<div contenteditable>',
+ '<div>',
+ 'This is |\u{00A0}some text.',
+ '</div>',
+ '</div>',
+ ].join('')),
+ 'Squash whitespaces around selection with nbsp');
+</script>

Powered by Google App Engine
This is Rietveld 408576698