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

Unified Diff: third_party/WebKit/LayoutTests/editing/inserting/before-after-input-element.html

Issue 2275223002: Convert editing/before-after-input-element.html to use w3c test harness (Closed)
Patch Set: 2016-08-25T15:45:05 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/inserting/before-after-input-element-expected.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/inserting/before-after-input-element.html
diff --git a/third_party/WebKit/LayoutTests/editing/inserting/before-after-input-element.html b/third_party/WebKit/LayoutTests/editing/inserting/before-after-input-element.html
index 8e8deb4d36d9153dea3dde9d4dd47b3378a1e15e..e8eca15c85c70234c1fe4a962eb3969618d0c218 100644
--- a/third_party/WebKit/LayoutTests/editing/inserting/before-after-input-element.html
+++ b/third_party/WebKit/LayoutTests/editing/inserting/before-after-input-element.html
@@ -1,17 +1,18 @@
+<!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>
-if (window.testRunner)
- testRunner.dumpEditingCallbacks();
-</script>
-<p>This tests text insertion before/after an input element.</p>
-<div id="div" contenteditable="true"><input type="text"></div>
-
-<script>
-var div = document.getElementById("div");
-var sel = window.getSelection();
-sel.collapse(div, 0);
-
-document.execCommand("InsertText", false, "Hello");
-sel.collapse(div, div.childNodes.length);
+test(() => assert_selection(
+ '<div contenteditable>|<input></div>',
+ 'insertText foo',
+ '<div contenteditable>foo|<input></div>'),
+ 'insert text before INPUT');
-document.execCommand("InsertText", false, "World");
+test(() => assert_selection(
+ '<div contenteditable><input>|</div>',
+ 'insertText foo',
+ '<div contenteditable><input>foo|</div>'),
+ 'insert text after INPUT');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/inserting/before-after-input-element-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698