Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / 15381.html
blob6cc38205add4d6347629397bafd3b27926c9708c
1 <div id="test"><div id="edit" contentEditable="true">centered text</div></div>
3 <script>
4 if (window.testRunner)
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)
19 output += "Success";
20 else
21 output += "Failure. Expected: " + expected + ", found: " + actual;
23 document.body.innerText = output;
24 </script>