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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/execCommand/insertHTML.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/insertHTML.html b/third_party/WebKit/LayoutTests/editing/execCommand/insertHTML.html
index 56d1c61460d41538001aa53086ded27882438ecd..8ebb706b9331fc901856a94858e0d2c221c3b981 100644
--- a/third_party/WebKit/LayoutTests/editing/execCommand/insertHTML.html
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/insertHTML.html
@@ -1,39 +1,19 @@
-<html>
-<head>
-<script src=../editing.js language="JavaScript" type="text/JavaScript"></script>
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
<script>
-
-if (window.testRunner)
- window.testRunner.dumpAsText();
-
-function log(message) {
- var console = document.getElementById("console");
- var li = document.createElement("li");
- var text = document.createTextNode(message);
- li.appendChild(text);
- console.appendChild(li);
-}
-
-function editingTest() {
- var d = document.getElementById("test");
- var html = d.innerHTML.toLowerCase();
-
- selectAllCommand();
- deleteCommand();
- insertHTMLCommand(html);
-
- log(d.innerHTML);
-}
+test(() => assert_selection(
+ '<div contenteditable>|</div>',
+ 'insertHTML foo<table style="display:inline-table"><tr><td>1</td><td>2</td></tr></table><b>bar</b>!',
+ [
+ '<div contenteditable>',
+ 'foo',
+ '<table style="display:inline-table"><tbody>',
+ '<tr><td>1</td><td>2</td></tr>',
+ '</tbody></table>',
+ '<b>bar</b>!|',
+ '</div>',
+ ].join('')),
+ 'insertHTML');
</script>
-</head>
-
-<body>
-<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>
-<div id="test" contenteditable="true">hello<table style="display:inline-table" border=1><tr><td>1</td><td>2</td></tr></table><b>world</b>!</div>
-<ul id="console"></ul>
-<script>
-runEditingTest();
-</script>
-</body>
-
-</html>
« 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