Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / undo / 4059423-2.html
1 <head>
2 <script>
3 function runTest() {
4     if (window.testRunner)
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");
17 }
18 </script>
19 </head>
20 <body contentEditable="true" onLoad="runTest();"></body>