OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../resources/js-test.js"></script> | |
4 </head> | |
5 <body> | |
6 <p id="description"></p> | |
7 <div id="console"></div> | |
8 | |
9 <script> | |
10 var destroyStreamCalled = false; | |
11 | |
12 function main() { | |
13 if (!window.testRunner) { | |
14 debug("This test can only run from within DumpRenderTree, be
cause it requires TestNetscapePlugin.\n"); | |
15 return; | |
16 } | |
17 testRunner.waitUntilDone(); | |
18 } | |
19 | |
20 main(); | |
21 | |
22 function streamStarted() { | |
23 testFailed("TestNetscapePlugin should have returned an error fro
m NewStream."); | |
24 } | |
25 | |
26 function streamDestroyed() { destroyStreamCalled = true; } | |
27 | |
28 function requestCompleted() { | |
29 shouldBeFalse("destroyStreamCalled"); | |
30 | |
31 debug('<br><span class="pass">TEST COMPLETE</span>'); | |
32 | |
33 testRunner.notifyDone(); | |
34 } | |
35 </script> | |
36 | |
37 <embed | |
38 type="application/x-webkit-test-netscape" | |
39 onStreamLoad="streamStarted()" | |
40 onStreamDestroy="streamDestroyed" | |
41 onURLNotify="requestCompleted()" | |
42 id="plugin"> | |
43 </body> | |
44 <script> | |
45 description("This tests that NPP_DestroyStream is not called if a plugin
returns an error from its NPP_NewStream callback."); | |
46 | |
47 var plugin = document.getElementById("plugin"); | |
48 | |
49 plugin.returnErrorFromNewStream = true; | |
50 shouldBeTrue("plugin.returnErrorFromNewStream"); | |
51 | |
52 plugin.getURLNotify("data:,", null, "callback"); | |
53 </script> | |
54 </html> | |
55 | |
OLD | NEW |