6 function npapiCallback(x
) {
12 if (window
.testRunner
)
13 testRunner
.dumpAsText();
16 var plugin
= document
.getElementById("testPlugin");
17 plugin
.logDestroy
= true;
19 var testObject
= plugin
.testObject
;
20 plugin
.testPassTestObject("npapiCallback", testObject
);
21 var testObject2
= testObject
.testObject
;
22 plugin
.testPassTestObject("npapiCallback", testObject2
);
23 var testObject3
= testObject2
.testObject
;
24 plugin
.testPassTestObject("npapiCallback", testObject3
);
26 if (callbackCount
== 3)
29 plugin
.parentNode
.removeChild(plugin
);
34 if (e
instanceof ReferenceError
)
39 testObject
.property
= 'hello';
41 if (e
instanceof ReferenceError
)
48 if (e
instanceof ReferenceError
)
55 if (e
instanceof ReferenceError
)
59 if (successCount
== 5)
60 document
.getElementById('result').innerHTML
= 'SUCCESS';
65 <body onload=
"runTest();">
67 This tests that objects from plugin objects are properly cleaned up.
71 ------- (Creates) ------ Object1
72 ------- (Creates) ------ Object2
74 It is important that both Object1 and Object2 cleanup as a result of
75 cleaning up the plugin.
77 <div id=
"result">FAILURE
</div>
78 <embed id=
"testPlugin" type=
"application/x-webkit-test-netscape" width=
"200" height=
"200"></embed>