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

Side by Side Diff: LayoutTests/plugins/netscape-dom-access-and-reload.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 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function runTest()
6 {
7 // Make the plugin retrieve a DOM element to itself. This exercises
8 // https://bugs.webkit.org/show_bug.cgi?id=80428
9 document.getElementById("testPlugin").testDOMAccess();
10
11 var callReload = true;
12 if (window.sessionStorage) {
13 if (window.sessionStorage.netscapeDomAccessAndReloadHasReloaded)
14 callReload = false;
15 else
16 window.sessionStorage.netscapeDomAccessAndReloadHasReloaded = 1;
17 }
18
19 if (window.testRunner)
20 testRunner.dumpAsText();
21
22 if (callReload) {
23 if (window.testRunner)
24 testRunner.waitUntilDone();
25 location.reload();
26 } else {
27 window.GCController.collect();
28 // Note we could also collect the number of live nodes, but that seems
29 // more likely to give spurious failures. When an HTMLPluginElement is
30 // improperly retained, its owning Document also survives, so we'll
31 // detect an excess Document.
32 if (internals && internals.numberOfLiveDocuments) {
33 var numberOfLiveDocuments = internals.numberOfLiveDocuments();
34 if (numberOfLiveDocuments == 1) {
35 document.getElementById("result").innerHTML = "SUCCESS";
36 }
37 } else {
38 document.getElementById("result").innerHTML = "FAILED; This test i s only valid in DumpRenderTree, and only when the Inspector is enabled.";
39 }
40 if (window.testRunner) {
41 testRunner.dumpAsText();
42 testRunner.notifyDone();
43 }
44 }
45 }
46 </script>
47 </head>
48 <body onload="runTest();">
49 <p>This page tests reloading a Netscape plugin that accesses its own DOM element . See https://bugs.webkit.org/show_bug.cgi?id=80428, "HTMLPluginElement is not d estroyed on reload or navigation if getNPObject is called".
50
51 If it succeeds, you should see SUCCESS below.
52 <embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" hei ght="200"></embed>
53 <div id="result">FAILURE</div>
54 </body>
55 </html>
OLDNEW
« no previous file with comments | « LayoutTests/plugins/netscape-dom-access.html ('k') | LayoutTests/plugins/netscape-dom-access-and-reload-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698