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

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

Issue 2296583002: Convert editing/inserting/redo.html to use w3c test harness (Closed)
Patch Set: 2016-08-30T15:22: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
Index: third_party/WebKit/LayoutTests/editing/inserting/redo_insert_text.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/redo_insert_text.html b/third_party/WebKit/LayoutTests/editing/inserting/redo_insert_text.html
new file mode 100644
index 0000000000000000000000000000000000000000..5f326941cb96f0684df60e52579fdb33f8e4f874
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/inserting/redo_insert_text.html
@@ -0,0 +1,26 @@
+<!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>|</div>',
+ selection => {
+ selection.document.execCommand('insertText', false, 'foo');
+ selection.document.execCommand('undo');
+ selection.document.execCommand('redo');
+ },
+ '<div contenteditable>foo|</div>'),
+ 'Redo insertText on empty editable');
+
+test(() => assert_selection(
+ '<div contenteditable>fo|o</div>',
+ selection => {
+ selection.document.execCommand('insertText', false, 'bar');
+ selection.document.execCommand('undo');
+ selection.document.execCommand('redo');
+ },
+ '<div contenteditable>fobar|o</div>'),
+ 'Redo insertText on non-empty editable');
+</script>

Powered by Google App Engine
This is Rietveld 408576698