3 <script src=
"npapi.js"></script>
5 function setTestObject(object
) {
6 window
.testObject
= object
;
7 setTimeout("deleteTestObject()", 0);
8 var statusPanel
= document
.getElementById("statusPanel");
9 statusPanel
.innerText
= "Received test object...";
12 function deleteTestObject() {
13 window
.testObject
= null;
14 var statusPanel
= document
.getElementById("statusPanel");
15 statusPanel
.innerText
= "Deleted test object...";
19 function deletePlugin() {
20 var statusPanel
= document
.getElementById("statusPanel");
21 statusPanel
.innerText
= "Deleting plugin...";
22 var plugin
= document
.getElementById("delete_plugin_in_deallocate_test");
23 if (plugin
.parentNode
&& plugin
.parentNode
.removeChild
) {
24 plugin
.parentNode
.removeChild(plugin
);
31 <div id=
"statusPanel" style=
"border: 1px solid red; width: 100%">
35 NPObject Delete in Deallocate
<p>
37 Tests the case where deallocation of an NPObject belonging to the plugin
38 triggers scripting which causes the whole plugin to be torn down, and verifies
39 that the object being deallocated is not deallocated a second time.
42 <embed type=
"application/vnd.npapi-test"
44 name=
"delete_plugin_in_deallocate_test"
48 <embed type=
"application/vnd.npapi-test"
50 name=
"delete_plugin_in_deallocate_test"
51 id=
"delete_plugin_in_deallocate_test"