upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / editing / execCommand / 15381.html
1 <div id="test"><div id="edit" contentEditable="true">centered text</div></div>
2
3 <script>
4 if (window.layoutTestController)
5     window.layoutTestController.dumpAsText();
6     
7 test = document.getElementById("test");
8 edit = document.getElementById("edit");
9
10 window.getSelection().setPosition(edit, 0);
11 document.execCommand("JustifyCenter");
12
13 expected = '<div id="edit" contenteditable="true"><div style="text-align: center;">centered text</div></div>';
14 actual = test.innerHTML;
15
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"
17
18 if (actual == expected)
19     output += "Success";
20 else
21     output += "Failure.  Expected: " + expected + ", found: " + actual;
22     
23 document.body.innerText = output;
24 </script>