summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/http/tests/plugins/geturlnotify-from-npp-destroystream.html
blob: e2f6dc98f71277cdd4cbc91df1d33f9d04036975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<script>
function streamDestroyed()
{
    plg.getURL("data:text/html,Stream data");
}

function runTest() {
    plg.getURL("/plugins/resources/slow-resource.pl");

    if (window.testRunner) {
        testRunner.dumpAsText();
        testRunner.waitUntilDone();
    }

    var url = 'data:text/html,<scri' + 'pt>if (window.testRunner) testRunner.notifyDone();</scri' + 'pt>';
    url += '<div>This tests that a plugin that calls NPP_GetURLNotify from its NPP_DestroyStream during teardown '
    url += 'will not cause a crash.</div><div>SUCCESS! Did not crash!</div>';

    setTimeout(function() { window.location.href = url; }, 100);
}

</script>
<body onload="runTest()">
<embed name="plg" type="application/x-webkit-test-netscape" onstreamdestroy="streamDestroyed()"></embed>
</body>
</html>