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

Side by Side Diff: LayoutTests/plugins/plugin-persists.html

Issue 23618022: BrowserPlugin/WebView - Move plugin lifetime to DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ASSERT on ownerElement->widget() == this causes many tests to fail. Created 6 years, 12 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 <style>
4 #plugin {
5 width: 150px;
6 height: 150px;
7 }
8 </style>
9 </head>
10
11 <body>
12 <embed id="plugin" type="application/x-webkit-test-webplugin-persistent" primiti ve="triangle" background-color="green" primitive-color="blue"></embed>
13 <div>Each line below should start with 'Pass':</div>
14 <div id="result1"></div>
15 <div id="result2"></div>
16 <script>
17
18 if (!window.testRunner) {
19 document.write("This test does not work in manual mode.");
20 } else {
21 testRunner.dumpAsText();
22 testRunner.waitUntilDone();
23
24 if (plugin.isPersistent)
25 result1.innerHTML = "Pass: plugin identifies itself as persistent.";
26 else
27 result1.innerHTML = "Fail: plugin identifies itself as not-persistent. ";
28
29 // Grab a copy of the plugin's instance id ... it should not change if
30 // the plugin persists.
31 instanceId = plugin.instanceId;
32
33 // Verify that the plugin is not destroyed.
34 plugin.setAttribute("display", "none");
35 // Force synchronous style recalc.
36 plugin.offsetTop;
37
38 window.setTimeout(function () {
39 if (plugin.instanceId == instanceId)
40 result2.innerHTML = "Pass: plugin is persisting.";
41 else
42 result2.innerHTML = "Fail: plugin failed to persist.";
43 testRunner.notifyDone();
44 }, 50);
45 }
46
47 </script>
48 </body>
49 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698