| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <script> | |
| 3 function runTest() | |
| 4 { | |
| 5 if (window.testRunner) | |
| 6 testRunner.dumpAsText(); | |
| 7 | |
| 8 var successCount = 0; | |
| 9 var plugin = document.getElementById("testPlugin"); | |
| 10 var retval = plugin.testInvokeDefault( | |
| 11 function f(str) { | |
| 12 if (f == this && str == 'test') | |
| 13 successCount++; | |
| 14 }); | |
| 15 | |
| 16 if (retval) | |
| 17 successCount++; | |
| 18 | |
| 19 retval = plugin.testInvokeDefault(window.location); | |
| 20 if (!retval) | |
| 21 successCount++; | |
| 22 | |
| 23 if (successCount == 3) | |
| 24 document.getElementById('result').innerHTML = 'SUCCESS' | |
| 25 } | |
| 26 </script> | |
| 27 | |
| 28 <body onload="runTest();"> | |
| 29 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. | |
| 30 <div id="result">FAILURE</div> | |
| 31 <embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" hei
ght="200"></embed> | |
| 32 </body> | |
| 33 </html> | |
| OLD | NEW |