4 https://bugzilla.mozilla.org/show_bug.cgi?id=635636
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"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=635636">Mozilla Bug
635636</a>
18 <script type=
"application/javascript">
20 /** Test for Bug
635636 **/
21 SimpleTest.waitForExplicitFinish();
22 addLoadEvent(function() {
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);
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)
41 .QueryInterface(Ci.nsIInterfaceRequestor)
42 .getInterface(Ci.nsIDOMWindow);
43 var browser = mainWindow.gBrowser.selectedBrowser;
44 browser.addEventListener(
"pageshow", function() {
51 d.parentNode.removeChild(d);
52 ok(true,
"Should not crash");
53 // Not needed for the crash