[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / content / test / data / npapi / npobject_lifetime_test.html
blob634fad813958497dc93c05a78b61721a3816e1d8
1 <html>
3 <head>
4 <script src="npapi.js"></script>
5 </head>
8 <body>
9 <div id="statusPanel" style="border: 1px solid red; width: 100%">
10 Test running....
11 </div>
14 NPObject Lifetime test<p>
16 Tests the case where a plugin holds on to an NPObject reference
17 to another plugin in a different frame in the page and whether
18 the npobject is callable when the frame is destroyed.
20 <div ID=npobject_lifetime_test_instance2>
21 <iframe src="npobject_lifetime_test_second_instance.html" name="plugin_frame">
22 </iframe>
23 </div>
25 <embed type="application/vnd.npapi-test"
26 src="foo"
27 name="npobject_lifetime_test"
28 id="1"
29 mode="np_embed">
31 <script>
33 function GetSecondPluginInstance() {
34 var plugin_frame = window.frames["plugin_frame"];
35 if (!plugin_frame) {
36 alert("failed to find frame in frames list");
37 return;
40 var plugin = plugin_frame.document.getElementById(2);
41 if (!plugin) {
42 alert("Failed to locate second plugin");
43 return;
45 return plugin;
48 function DeleteSecondPluginInstance() {
49 var frame_div = document.getElementById("npobject_lifetime_test_instance2");
50 if (frame_div.parentNode && frame_div.parentNode.removeChild) {
51 frame_div.parentNode.removeChild(frame_div);
54 </script>
56 </body>
57 </html>