blob: c7bbac9c6d130183fd73ec10c0e81283fb4e9d9b [file] [log] [blame]
<div id="div" contenteditable="true">foo</div>
<script>
if (window.layoutTestController)
window.layoutTestController.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>