Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / indent-list-item-with-children.html
blobc791a80482341deb0bd96ebefbcbbc521f84c363
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/dump-as-markup.js"></script>
5 </head>
6 <body>
7 <div contentEditable id="first">
8 <ol>
9 <li id="listItemBlock">before<div>div1</div><div>div2</div><div>div3</div>after</li>
10 <li id="listItemInline">before<span>span1</span><span>span2</span><span>span3</span>after</li>
11 <li id="listItemTable">before<table border="1" cellpadding="2" cellspacing="2"><tr><td><br/></td></tr></table>after</li>
12 </ol>
13 </div>
14 <div contentEditable id="second">
15 <ol>
16 <pre><ul><li id="listItemPre">hello
17 world</li>
18 </ul></pre>
19 </ol>
20 </div>
21 <script>
22 Markup.waitUntilDone();
24 function indentListItem(item) {
25 window.getSelection().collapse(item, 0);
26 document.execCommand("indent");
29 Array.prototype.slice.call(document.getElementsByTagName('li')).forEach(indentListItem);
30 Markup.dump(document.getElementById('first'), "Indent With Children");
31 Markup.dump(document.getElementById('second'), "Indent With Pre");
33 Markup.notifyDone();
34 </script>
35 </body>
36 </html>