blob: 0501d17cd3eb983433837c2dcb006b6cb2879901 [file] [log] [blame]
<html>
<head>
<script src="../../fast/js/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>