blob: 72795031c78bab8d9024a7aa8729c90c8e3852df [file] [log] [blame]
<script src="../../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>