OLD | NEW |
| (Empty) |
1 <head> | |
2 <script src="../resources/js-test.js"></script> | |
3 </head> | |
4 <body> | |
5 <script> | |
6 function main() | |
7 { | |
8 if (!window.testRunner) { | |
9 debug("This test can only run from within DumpRenderTree because it requ
ires TestNetscapePlugin.\n"); | |
10 return; | |
11 } | |
12 | |
13 testRunner.waitUntilDone(); | |
14 } | |
15 main(); | |
16 | |
17 function runTest() | |
18 { | |
19 debug("destroyStream() returns zero to indicate success, or a non-zero error
code to indicate failure"); | |
20 | |
21 shouldBe("document.getElementById('plugin').hasStream", "true"); | |
22 shouldBe("document.getElementById('plugin').destroyStream()", "2"); // we ex
pect to fail because the stream should already have completed loading and destro
yed itself | |
23 shouldBe("document.getElementById('plugin').destroyStream()", "2"); // try a
gain, just for good measure | |
24 | |
25 shouldBe("document.getElementById('plugin').destroyNullStream()", "2"); // N
ow try destroying a null stream | |
26 | |
27 debug("PASS: You didn't crash.\n"); | |
28 | |
29 isSuccessfullyParsed(); | |
30 testRunner.notifyDone(); | |
31 } | |
32 </script> | |
33 <embed id="plugin" | |
34 type="application/x-webkit-test-netscape" | |
35 src="data:text/plain," | |
36 style="width:0; height:0" | |
37 onstreamload="setTimeout(runTest, 0);"> | |
38 </embed> | |
39 | |
40 <script> | |
41 description("Test for http://bugs.webkit.org/show_bug.cgi?id=13203: REGRESSION:
Repro crash in -[WebBaseNetscapePluginView(WebNPPCallbacks) destroyStream:reason
:] navigating away from page with DivX movie plugin"); | |
42 | |
43 | |
44 </script> | |
OLD | NEW |