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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/plugins/get-url-notify-on-removal.html

Issue 1426923007: Remove PluginLoadObserver and related logic, it was only used for NPAPI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
(Empty)
1 <html>
2 <body>
3 This tests that NPP_URLNotify gets called exactly once for canceled streams on p lugin removal.
4 <div id="result">FAILURE</div>
5 <embed name="plg" type="application/x-webkit-test-netscape"></embed>
6 <script>
7 var callbackRun = false;
8 function callback()
9 {
10 if (callbackRun) {
11 result.textContent = "FAILURE - callback run twice";
12 return;
13 }
14
15 callbackRun = true;
16 result.textContent = "SUCCESS";
17 // Force the plugin to spin a nested event loop.
18 alert("Request completed");
19 // Don't stop the test until a small delay, in case callback is called a gain.
20 setTimeout(notify, 50);
21 }
22 function notify()
23 {
24 if (window.testRunner)
25 testRunner.notifyDone();
26 }
27 if (window.testRunner) {
28 testRunner.dumpAsText();
29 testRunner.waitUntilDone();
30 }
31
32 plg.getURLNotify("resources/slow-resource.pl", null, "callback");
33 // Remove the plugin after a short delay (to give the resource time to
34 // propagate through the system to the browser).
35 setTimeout(function() {
36 plg.parentNode.removeChild(plg);
37 }, 50);
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698