| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| function doTest() |
| { |
| description('This page tests invoking as functions JavaScript objects that are provided by plugins.') |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| pluginWithInvokeDefault = document.getElementById('plugin-with-invoke-default'); |
| |
| shouldBe("typeof(pluginWithInvokeDefault)", "'function'"); |
| shouldBe("pluginWithInvokeDefault()", "1") |
| |
| pluginWithoutInvokeDefault = document.getElementById('plugin-without-invoke-default'); |
| shouldBe("typeof(pluginWithoutInvokeDefault)", "'object'"); |
| shouldThrow("pluginWithoutInvokeDefault()"); |
| } |
| </script> |
| </head> |
| <body onload="doTest();"> |
| <embed id="plugin-with-invoke-default" type="application/x-webkit-test-netscape" test="plugin-scriptable-npobject-invoke-default"></embed> |
| <embed id="plugin-without-invoke-default" type="application/x-webkit-test-netscape" test="plugin-scriptable-npobject-no-invoke-default"></embed> |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| </body> |
| </html> |