Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / 5062376.html
blob325082d00ee63709b40a6735356840453a21bf6e
1 <div id="div" contenteditable="true">foo</div>
3 <script>
4 if (window.testRunner)
5 window.testRunner.dumpAsText();
7 var div = document.getElementById("div");
8 div.focus();
9 document.execCommand("JustifyCenter");
10 document.execCommand("JustifyRight");
12 expected = '<div style="text-align: right;">foo</div>';
13 actual = div.innerHTML;
15 output = "This tests for a bug where centering text would prevent it from being right or left aligned again. The paragraph should be right aligned.\n\n"
17 if (actual == expected)
18 output += "Success";
19 else
20 output += "Failure. Expected: " + expected + ", found: " + actual;
22 document.body.innerText = output;
23 </script>