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

Unified Diff: third_party/WebKit/LayoutTests/editing/undo/redo_rebalance_whitespace.html

Issue 2249833003: Convert editing/undo/4063751.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-17T10:59:55 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/undo/redo_rebalance_whitespace.html
diff --git a/third_party/WebKit/LayoutTests/editing/undo/redo_rebalance_whitespace.html b/third_party/WebKit/LayoutTests/editing/undo/redo_rebalance_whitespace.html
new file mode 100644
index 0000000000000000000000000000000000000000..61dfbad8f3d4408db2024895b9d60791dde73307
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/undo/redo_rebalance_whitespace.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>
+ // This tests RebalanceWhitespace's ability to Undo.
+ test(() => assert_selection(
+ [
+ '<div contenteditable style="word-wrap: break-word;">',
+ '<div>( |)</div>',
+ '</div>',
+ ].join(''),
+ selection => {
+ Array.of('this is a test. ').forEach(character => {
+ selection.document.execCommand('insertText', false, character);
+ });
+ selection.document.execCommand('undo');
+ selection.document.execCommand('redo');
+ selection.document.execCommand('undo');
+ selection.document.execCommand('redo');
+ },
+ [
+ '<div contenteditable style="word-wrap: break-word;">',
+ '<div>( this is a test. |)</div>',
+ '</div>',
+ ].join('')),
+ 'Redo Typing can add extra space characters');
+</script>

Powered by Google App Engine
This is Rietveld 408576698