
<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>
