2 <script src=
"../resources/js-test.js"></script>
3 <embed id=
"testPlugin" logfirstsetwindow=
"true" type=
"application/x-webkit-test-netscape">
5 description("Verify that sync XHRs cancelled by sync NPN message does not crash.");
7 if (window
.testRunner
) {
8 testRunner
.dumpAsText();
9 testRunner
.waitUntilDone();
14 var plugin
= document
.getElementById("testPlugin");
15 var x
= new XMLHttpRequest();
16 x
.open('GET', '/resources/not-there', false);
17 // Injecting a call to Evaluate() here will cause the message
18 // corresponding to logfirstsetwindow's "testRunner.notifyDone()",
19 // to be synchronously handled during the sync XHR. Which in turn
20 // triggers the cancellation of the load.
21 plugin
.testEvaluate("1+2;");
24 setTimeout(runTest
, 1);