| <script src="../resources/js-test-pre.js"></script> |
| var destroyStreamCalled = false; |
| if (!window.testRunner) { |
| debug("This test can only run from within DumpRenderTree, because it requires TestNetscapePlugin.\n"); |
| testRunner.waitUntilDone(); |
| function streamStarted() { |
| testFailed("TestNetscapePlugin should have returned an error from NewStream."); |
| function streamDestroyed() { destroyStreamCalled = true; } |
| function requestCompleted() { |
| shouldBeFalse("destroyStreamCalled"); |
| debug('<br><span class="pass">TEST COMPLETE</span>'); |
| type="application/x-webkit-test-netscape" |
| onStreamLoad="streamStarted()" |
| onStreamDestroy="streamDestroyed" |
| onURLNotify="requestCompleted()" |
| description("This tests that NPP_DestroyStream is not called if a plug-in returns an error from its NPP_NewStream callback."); |
| var plugin = document.getElementById("plugin"); |
| plugin.returnErrorFromNewStream = true; |
| shouldBeTrue("plugin.returnErrorFromNewStream"); |
| plugin.getURLNotify("data:,", null, "callback"); |