JavaScriptCore:
[WebKit-https.git] / LayoutTests / plugins / netscape-invoke-default.html
1 <html>
2 <script>
3 function runTest()
4 {
5     if (window.layoutTestController)
6         layoutTestController.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     if (successCount == 2)
20         document.getElementById('result').innerHTML = 'SUCCESS'
21 }
22 </script>
23
24 <body onload="runTest();">
25 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.
26 <div id="result">FAILURE</div>
27 <embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" height="200"></embed>
28 </body>
29 </html>