| <html> |
| <script> |
| function runTest() |
| { |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| |
| var successCount = 0; |
| var plugin = document.getElementById("testPlugin"); |
| var retval = plugin.testInvokeDefault( |
| function f(str) { |
| if (f == this && str == 'test') |
| successCount++; |
| }); |
| |
| if (retval) |
| successCount++; |
| |
| retval = plugin.testInvokeDefault(window.location); |
| if (!retval) |
| successCount++; |
| |
| if (successCount == 3) |
| document.getElementById('result').innerHTML = 'SUCCESS' |
| } |
| </script> |
| |
| <body onload="runTest();"> |
| This tests that it's possible to call NPN_InvokeDefault on a JavaScript object. If this test succeeded, the text "SUCCESS" should be shown below. |
| <div id="result">FAILURE</div> |
| <embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" height="200"></embed> |
| </body> |
| </html> |