1 <div id=
"test"><div id=
"edit" contentEditable=
"true">centered text
</div></div>
5 window
.testRunner
.dumpAsText();
7 test
= document
.getElementById("test");
8 edit
= document
.getElementById("edit");
10 window
.getSelection().collapse(edit
, 0);
11 document
.execCommand("JustifyCenter");
13 expected
= '<div id="edit" contenteditable="true"><div style="text-align: center;">centered text</div></div>';
14 actual
= test
.innerHTML
;
16 output
= "This tests to make sure that centering content whose enclosing block is the root editable element doesn't modify the root editable element.\n\n"
18 if (actual
== expected
)
21 output
+= "Failure. Expected: " + expected
+ ", found: " + actual
;
23 document
.body
.innerText
= output
;