blob: 01f714adfa9ee1de7fb8b26e6ab1fb2398878ea4 [file] [log] [blame]
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<script>
function runTest() {
plugin = document.getElementById('plugin');
// Get our test object.
testObject = plugin.testObject;
// Now destroy the plug-in.
plugin.parentNode.removeChild(plugin);
// testObject is now a dangling object and every operation on it should throw.
shouldThrow('testObject.gettingProperty');
shouldThrow('testObject.settingProperty = 10');
shouldThrow('testObject()');
shouldThrow('new testObject();')
}
</script>
<body onLoad="runTest()">
<embed id="plugin" type="application/x-webkit-test-netscape" test="npruntime-object-from-destroyed-plugin"></embed>
<p id="description"></p>
<div id="console"></div>
<script>
description("Test various operation on an NPObject whose plug-in has been destroyed");
</script>