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

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/remove-list-1.html

Issue 2276563003: Convert editing/execCommand/remove-list-item-1.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-25T10:29:13 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/editing/execCommand/remove-list-1-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/remove-list-1.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-1.html b/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-1.html
index 3d7ba13acdd767e82c3a18864e498f4603a92ba7..9e13bb41b959f31fe22573df375e6449f10c58a3 100644
--- a/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-1.html
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-1.html
@@ -1,28 +1,27 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
<script>
-if (window.testRunner) {
- testRunner.dumpEditingCallbacks();
- testRunner.dumpAsText();
-}
-</script>
-<p>This tests de-listing content.</p>
-<div id="div" contenteditable="true"><ol><li></li><li>There should be a single BR above this line and no OL or LI.</li></ol></div>
-<p id="console"></p>
-
-<script>
-
-function log(message) {
- var console = document.getElementById("console");
- var text = document.createTextNode(message);
- console.appendChild(text);
-}
-
-var div = document.getElementById("div");
-var sel = window.getSelection();
-
-div.focus();
-document.execCommand("SelectAll");
-document.execCommand("InsertOrderedList");
-
-log(div.innerHTML);
-
+ test(() => assert_selection(
+ [
+ '<div contenteditable>',
+ '<ol>',
+ '<li>|</li>',
+ '<li>foo bar</li>',
+ '</ol>',
+ '</div>',
+ ].join(''),
+ selection => {
+ selection.document.execCommand('selectAll');
+ selection.document.execCommand('insertOrderedList');
+ },
+ [
+ '<div contenteditable>',
+ // TODO(yosin): We should study why unlistify sets caret before
+ // last character.
+ '^<br>foo ba|r',
+ '</div>',
+ ].join('')),
+ 'Unlistify with an empty list item');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/execCommand/remove-list-1-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698