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