1 <p>This test checks for a NULL document crash that can happen when calling
2 XMLHttpRequest.open. If the test passes, you'll see a PASS message below.
</p>
5 <iframe name=
"iframe" style=
"visibility:hidden" src=
"does-not-exist.bogus"></iframe> <!-- forces asynchronous load -->
10 document
.getElementById("pre").appendChild(document
.createTextNode(s
));
15 var request
= new XMLHttpRequest();
16 request
.onreadystatechange = function(event
) { if (event
.target
.readyState
== 1) parent
.pass(); };
17 request
.open("GET", window
.location
);
22 log("PASS: You didn't crash.");
24 if (window
.testRunner
)
25 testRunner
.notifyDone();
30 if (window
.testRunner
) {
31 testRunner
.dumpAsText();
32 testRunner
.waitUntilDone();
35 // setTimeout forces execution in the context of the frame
36 frames
[0].setTimeout(test
, 0);