blob: 325082d00ee63709b40a6735356840453a21bf6e [file] [log] [blame]
<div id="div" contenteditable="true">foo</div>
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
var div = document.getElementById("div");
div.focus();
document.execCommand("JustifyCenter");
document.execCommand("JustifyRight");
expected = '<div style="text-align: right;">foo</div>';
actual = div.innerHTML;
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"
if (actual == expected)
output += "Success";
else
output += "Failure. Expected: " + expected + ", found: " + actual;
document.body.innerText = output;
</script>