Chromium Code Reviews| 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..674af04def36676e5f28c94fda0ba77e4698e5fd 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 unlisty set caret before |
|
Xiaocheng
2016/08/25 01:11:49
nit: s/unlisty set/unlistify sets
yosin_UTC9
2016/08/25 01:30:28
Done.
|
| + // last character. |
| + '^<br>foo ba|r', |
| + '</div>', |
| + ].join('')), |
| + 'Unlistify with an empty list item'); |
| </script> |