Index: LayoutTests/editing/execCommand/indent-list-item-with-children.html |
diff --git a/LayoutTests/editing/execCommand/indent-list-item-with-children.html b/LayoutTests/editing/execCommand/indent-list-item-with-children.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c791a80482341deb0bd96ebefbcbbc521f84c363 |
--- /dev/null |
+++ b/LayoutTests/editing/execCommand/indent-list-item-with-children.html |
@@ -0,0 +1,36 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../resources/dump-as-markup.js"></script> |
+</head> |
+<body> |
+<div contentEditable id="first"> |
+ <ol> |
+ <li id="listItemBlock">before<div>div1</div><div>div2</div><div>div3</div>after</li> |
+ <li id="listItemInline">before<span>span1</span><span>span2</span><span>span3</span>after</li> |
+ <li id="listItemTable">before<table border="1" cellpadding="2" cellspacing="2"><tr><td><br/></td></tr></table>after</li> |
+ </ol> |
+</div> |
+<div contentEditable id="second"> |
+<ol> |
+<pre><ul><li id="listItemPre">hello |
+world</li> |
+</ul></pre> |
+</ol> |
+</div> |
+<script> |
+Markup.waitUntilDone(); |
+ |
+function indentListItem(item) { |
+ window.getSelection().collapse(item, 0); |
+ document.execCommand("indent"); |
+} |
+ |
+Array.prototype.slice.call(document.getElementsByTagName('li')).forEach(indentListItem); |
+Markup.dump(document.getElementById('first'), "Indent With Children"); |
+Markup.dump(document.getElementById('second'), "Indent With Pre"); |
+ |
+Markup.notifyDone(); |
+</script> |
+</body> |
+</html> |