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

Side by Side Diff: chrome/test/data/npapi/plugin_delete_in_deallocate.html

Issue 7806020: Add DeletePluginInDeallocate UI test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
3 <head>
4 <script src="npapi.js"></script>
5 </head>
6
7
8 <body>
9 <div id="statusPanel" style="border: 1px solid red; width: 100%">
10 Test running....
11 </div>
12
13
14 NPObject Delete in Deallocate<p>
15
16 Tests the case where deallocation of an NPObject belonging to the plugin
17 triggers scripting which causes the whole plugin to be torn down, and verifies
18 that the object being deallocated is not deallocated a second time.
19
20 <embed type="application/vnd.npapi-test"
21 src="foo"
22 name="delete_plugin_in_deallocate_test"
23 id="delete_plugin_in_deallocate_test"
24 mode="np_embed">
25 <script>
26
27 function setTestObject(object) {
28 window.testObject = object;
29 setTimeout("deleteTestObject()", 0);
30 var statusPanel = document.getElementById("statusPanel");
31 statusPanel.innerText = "Received test object...";
32 }
33
34 function deleteTestObject() {
35 window.testObject = null;
36 var statusPanel = document.getElementById("statusPanel");
37 statusPanel.innerText = "Deleted test object...";
38 gc();
39 }
40
41 function deletePlugin() {
42 var plugin = document.getElementById("delete_plugin_in_deallocate_test");
43 if (plugin.parentNode && plugin.parentNode.removeChild) {
44 plugin.parentNode.removeChild(plugin);
45 }
46 }
47
48 </script>
49
50 </body>
51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698