Commit fd01db73 authored by yosin's avatar yosin Committed by Commit bot

Convert editing/execCommand/switch-list-type-with-inner-list.html to use w3c test harness

This patch converts "editing/execCommand/switch-list-type-with-inner-list.html" to use w3c test
harness to simplify test script for improving code health.

BUG=n/a
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2337413002
Cr-Commit-Position: refs/heads/master@{#418527}
parent f07a795e
This tests switching an unordered list with a nested list to an ordered list.
| "
"
| <ol>
| <li>
| "<#selection-anchor>hello"
| "
"
| <ol>
| "
"
| <li>
| "world"
| "
"
| "
"
| <li>
| "webkit<#selection-focus>"
| "
"
<script src="../../resources/dump-as-markup.js"></script> <!doctype html>
<body> <script src="../../resources/testharness.js"></script>
<div id="test" contenteditable> <script src="../../resources/testharnessreport.js"></script>
<ul> <script src="../assert_selection.js"></script>
<li>hello</li>
<ol>
<li>world</li>
</ol>
<li>webkit</li>
</ul>
</div>
<script> <script>
Markup.description('This tests switching an unordered list with a nested list to an ordered list.'); test(() => assert_selection(
[
var test = document.getElementById('test'); '<div contenteditable>',
window.getSelection().selectAllChildren(test); '<ul>',
document.execCommand('InsertOrderedList', false, null); '<li>^hello</li>',
'<ol>',
Markup.dump('test'); '<li>world</li>',
'</ol>',
'<li>webkit|</li>',
'</ul>',
'</div>',
].join(''),
'insertOrderedList',
[
'<div contenteditable>',
'<ol>',
'<li>^hello</li>',
'<ol>',
'<li>world</li>',
'</ol>',
'<li>webkit|</li>',
'</ol>',
'</div>',
].join('')),
'switching an unordered list with a nested list to an ordered list.');
</script> </script>
</body>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment