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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/insertHTML.html

Issue 2330353004: Convert editing/execCommand/insertHTML.html to use w3c test harness (Closed)
Patch Set: 2016-09-14T13:07:27 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/editing/execCommand/insertHTML-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!doctype html>
2 <head> 2 <script src="../../resources/testharness.js"></script>
3 <script src=../editing.js language="JavaScript" type="text/JavaScript"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
4 <script> 5 <script>
5 6 test(() => assert_selection(
6 if (window.testRunner) 7 '<div contenteditable>|</div>',
7 window.testRunner.dumpAsText(); 8 'insertHTML foo<table style="display:inline-table"><tr><td>1</td><td>2</td>< /tr></table><b>bar</b>!',
8 9 [
9 function log(message) { 10 '<div contenteditable>',
10 var console = document.getElementById("console"); 11 'foo',
11 var li = document.createElement("li"); 12 '<table style="display:inline-table"><tbody>',
12 var text = document.createTextNode(message); 13 '<tr><td>1</td><td>2</td></tr>',
13 li.appendChild(text); 14 '</tbody></table>',
14 console.appendChild(li); 15 '<b>bar</b>!|',
15 } 16 '</div>',
16 17 ].join('')),
17 function editingTest() { 18 'insertHTML');
18 var d = document.getElementById("test");
19 var html = d.innerHTML.toLowerCase();
20
21 selectAllCommand();
22 deleteCommand();
23 insertHTMLCommand(html);
24
25 log(d.innerHTML);
26 }
27 </script> 19 </script>
28 </head>
29
30 <body>
31 <p>This is a test of execCommand(insertHTML, ...). The contents of the editable div below should be the same before and after the test.</p>
32 <div id="test" contenteditable="true">hello<table style="display:inline-table" b order=1><tr><td>1</td><td>2</td></tr></table><b>world</b>!</div>
33 <ul id="console"></ul>
34 <script>
35 runEditingTest();
36 </script>
37 </body>
38
39 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/execCommand/insertHTML-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698