Reviewed by Geoff Garen.
[WebKit-https.git] / LayoutTests / plugins / bindings-test.html
1 <html>
2 <head>
3 <script>
4 function doTest()
5 {
6     if (window.layoutTestController)
7         layoutTestController.dumpAsText();
8
9     if (window.objCPlugin) {
10         // Type should be "object"
11         alert("typeof(objCPlugin)=" + typeof(objCPlugin));
12
13         // Calling objCPlugin() should raise an exception.
14         var result;
15         try {
16             result = objCPlugin();
17         } catch (e) {
18             result = e.name;
19         }
20         alert("objCPlugin()=" + result);
21     }
22 }
23 </script>
24 </head>
25 <body onload="doTest();">
26 <p>This page tests invoking as functions JavaScript objects that are provided by plugins.</p>
27 <embed id="testCPlugin" type="application/x-webkit-test-netscape"></embed>
28 </body>
29 </html>