blob: 8d0a6a640f4fefc1b1ff9a44fe89c2643ffa5211 [file] [log] [blame]
<head>
<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
<script src="../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
function main()
{
if (!window.layoutTestController) {
debug("This test can only run from within DumpRenderTree because it requires TestNetscapePlugin.\n");
return;
}
layoutTestController.waitUntilDone();
}
main();
function runTest()
{
debug("destroyStream() returns zero to indicate success, or a non-zero error code to indicate failure");
shouldBe("document.getElementById('plugin').hasStream", "true");
shouldBe("document.getElementById('plugin').destroyStream()", "2"); // we expect to fail because the stream should already have completed loading and destroyed itself
shouldBe("document.getElementById('plugin').destroyStream()", "2"); // try again, just for good measure
debug("PASS: You didn't crash.\n");
shouldBeTrue("successfullyParsed");
debug('<br><span class="pass">TEST COMPLETE</span>');
layoutTestController.notifyDone();
}
</script>
<embed id="plugin"
type="application/x-webkit-test-netscape"
src="data:text/plain,"
style="width:0; height:0"
onstreamload="setTimeout(runTest, 0);">
</embed>
<script>
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 plug-in");
successfullyParsed = true;
</script>