Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: LayoutTests/plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html

Issue 1319473007: Delete a bunch of NPAPI layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698