5 window.testRunner.dumpAsText();
6 window.getSelection().collapse(document.body, 0);
7 document.execCommand("InsertText", false, "foo");
8 div = document.createElement("div");
9 div.appendChild(document.createTextNode("x"));
10 document.body.appendChild(div);
11 div.style.height = "0px";
12 div.style.overflow = "hidden";
13 document.execCommand("JustifyRight");
14 document.body.removeChild(div);
15 document.body.innerHTML = "<div align='right'>This tests for a crash on Undo that was caused because of DOM operations that GMail performs while right aligning text. This text should be right aligned and this test should not crash.</div>";
16 document.execCommand("Undo");
20 <body contentEditable="true" onLoad="runTest();"></body>