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

Side by Side 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, 3 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
5 <div id="log"></div>
1 <script> 6 <script>
2 if (window.testRunner) 7 test(() => assert_selection(
3 testRunner.dumpEditingCallbacks(); 8 '<div contenteditable>|<input></div>',
9 'insertText foo',
10 '<div contenteditable>foo|<input></div>'),
11 'insert text before INPUT');
12
13 test(() => assert_selection(
14 '<div contenteditable><input>|</div>',
15 'insertText foo',
16 '<div contenteditable><input>foo|</div>'),
17 'insert text after INPUT');
4 </script> 18 </script>
5 <p>This tests text insertion before/after an input element.</p>
6 <div id="div" contenteditable="true"><input type="text"></div>
7
8 <script>
9 var div = document.getElementById("div");
10 var sel = window.getSelection();
11 sel.collapse(div, 0);
12
13 document.execCommand("InsertText", false, "Hello");
14 sel.collapse(div, div.childNodes.length);
15
16 document.execCommand("InsertText", false, "World");
17 </script>
OLDNEW
« 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