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

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

Issue 2174683002: Convert editing/deleting/delete-ws-fixup-00[1234].html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-22T15:44: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
Index: third_party/WebKit/LayoutTests/editing/deleting/delete_ws_fixup.html
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete_ws_fixup.html b/third_party/WebKit/LayoutTests/editing/deleting/delete_ws_fixup.html
new file mode 100644
index 0000000000000000000000000000000000000000..52ddff6db4d8205ee5d755f02173286a389d201e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/deleting/delete_ws_fixup.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>
+test(() => assert_selection(
+ '<div contenteditable>abc<i>de ef</i> gh <b> i|j </b> kl</div>',
+ 'delete',
+ '<div contenteditable>abc<i>de ef</i> gh |<b>j </b> kl</div>'),
+ 'Delete a character also removes redundant whitespaces');
+
+test(() => assert_selection(
+ '<div contenteditable>abc<i>de ef</i> gh <b> ^ij| </b> kl</div>',
+ 'delete',
+ '<div contenteditable>abc<i>de ef</i> gh |<b>\u{00A0}</b>kl</div>'),
+ 'Delete characters and fix up whitespaces');
+
+test(() => assert_selection(
+ '<div contenteditable>bar ^baz|<span> </span>foo</div>',
+ 'delete',
+ '<div contenteditable>bar |<span>\u{00A0}</span>foo</div>'),
+ 'Delete characters and convert SPACEs to NBSP');
+
+test(() => assert_selection(
+ '<div contenteditable>bar ^baz|<span> \u{00A0} </span>foo</div>',
+ 'delete',
+ '<div contenteditable>bar |<span>\u{00A0} \u{00A0}</span>foo</div>'),
+ 'Delete characters and convert NBSP+SPACEs to NBSPs+SPACE');
+</script>

Powered by Google App Engine
This is Rietveld 408576698