Crash when trying to invalidate the NPRuntimeObjectMap for a plug-in in a subframe
[WebKit-https.git] / LayoutTests / plugins / return-npobject.html
1
2 <script>
3   var test_object = new Object();
4   test_object.value = 1;
5
6   function callback(arg) {
7     return test_object;
8   }
9
10   function runtest() {
11     if (window.layoutTestController)
12         layoutTestController.dumpAsText();
13
14     var obj = plug.testCallbackReturn("callback");
15     if (obj == test_object) {
16       var output = document.getElementById("output");
17       output.innerHTML = "SUCCESS";
18     }
19   }
20 </script>
21
22 <BODY id="bodyId" onload="runtest()">
23
24 <p>Test that we can get an NPObject returned through a method on
25 an NPAPI Object. Prints "SUCCESS" on success, "FAILURE" on failure.</p>
26
27 <embed name="plug" type="application/x-webkit-test-netscape">
28
29 <div id=output>FAILURE</div>
30
31 </BODY>
32