Bumping manifests a=b2g-bump
[gecko.git] / editor / libeditor / tests / test_bug635636.html
blobbc8172c617195138d6b5da39a9910a842b8a97c1
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=635636
5 -->
6 <head>
7 <title>Test for Bug 635636</title>
8 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
10 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=635636">Mozilla Bug 635636</a>
14 <p id="display"></p>
15 <div id="content">
16 </div>
17 <pre id="test">
18 <script type="application/javascript">
20 /** Test for Bug 635636 **/
21 SimpleTest.waitForExplicitFinish();
22 addLoadEvent(function() {
23 var w, d;
25 function b1()
27 w = window.open('data:application/xhtml+xml,<html xmlns="http://www.w3.org/1999/xhtml"><div>1</div></html>');
28 SimpleTest.waitForFocus(b2, w);
31 function b2()
33 w.document.designMode = 'on';
34 w.location = "data:text/plain,2";
35 d = w.document.getElementsByTagName("div")[0];
36 const Ci = Components.interfaces;
37 var mainWindow = w.QueryInterface(Ci.nsIInterfaceRequestor)
38 .getInterface(Ci.nsIWebNavigation)
39 .QueryInterface(Ci.nsIDocShellTreeItem)
40 .rootTreeItem
41 .QueryInterface(Ci.nsIInterfaceRequestor)
42 .getInterface(Ci.nsIDOMWindow);
43 var browser = mainWindow.gBrowser.selectedBrowser;
44 browser.addEventListener("pageshow", function() {
45 setTimeout(b3, 0);
46 }, false);
49 function b3()
51 d.parentNode.removeChild(d);
52 ok(true, "Should not crash");
53 // Not needed for the crash
54 w.close();
55 SimpleTest.finish();
58 b1();
59 });
61 </script>
62 </pre>
63 </body>
64 </html>