3 This tests that NPP_URLNotify gets called exactly once for canceled streams on plugin removal.
4 <div id=
"result">FAILURE
</div>
5 <embed name=
"plg" type=
"application/x-webkit-test-netscape"></embed>
7 var callbackRun
= false;
11 result
.textContent
= "FAILURE - callback run twice";
16 result
.textContent
= "SUCCESS";
17 // Force the plugin to spin a nested event loop.
18 alert("Request completed");
19 // Don't stop the test until a small delay, in case callback is called again.
20 setTimeout(notify
, 50);
24 if (window
.testRunner
)
25 testRunner
.notifyDone();
27 if (window
.testRunner
) {
28 testRunner
.dumpAsText();
29 testRunner
.waitUntilDone();
32 plg
.getURLNotify("resources/slow-resource.pl", null, "callback");
33 // Remove the plugin after a short delay (to give the resource time to
34 // propagate through the system to the browser).
35 setTimeout(function() {
36 plg
.parentNode
.removeChild(plg
);