| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../resources/js-test.js"></script> | |
| 4 </head> | |
| 5 <body> | |
| 6 <script> | |
| 7 function doTest() | |
| 8 { | |
| 9 description('This page tests invoking as functions JavaScript objects that a
re provided by plugins.') | |
| 10 | |
| 11 if (window.testRunner) | |
| 12 testRunner.dumpAsText(); | |
| 13 | |
| 14 pluginWithInvokeDefault = document.getElementById('plugin-with-invoke-defaul
t'); | |
| 15 | |
| 16 shouldBe("typeof(pluginWithInvokeDefault)", "'function'"); | |
| 17 shouldBe("pluginWithInvokeDefault()", "1") | |
| 18 | |
| 19 pluginWithoutInvokeDefault = document.getElementById('plugin-without-invoke-
default'); | |
| 20 shouldBe("typeof(pluginWithoutInvokeDefault)", "'object'"); | |
| 21 shouldThrow("pluginWithoutInvokeDefault()"); | |
| 22 } | |
| 23 </script> | |
| 24 </head> | |
| 25 <body onload="doTest();"> | |
| 26 <embed id="plugin-with-invoke-default" type="application/x-webkit-test-netscape"
test="plugin-scriptable-npobject-invoke-default"></embed> | |
| 27 <embed id="plugin-without-invoke-default" type="application/x-webkit-test-netsca
pe" test="plugin-scriptable-npobject-no-invoke-default"></embed> | |
| 28 <p id="description"></p> | |
| 29 <div id="console"></div> | |
| 30 | |
| 31 </body> | |
| 32 </html> | |
| OLD | NEW |