<html>
<head>
<script language="javascript">
function print(message)
{
var paragraph = document.createElement("p");
paragraph.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(paragraph);
}
function test()
{
if(window.testRunner)
testRunner.dumpAsText();
objectInsideForm = document.getElementById("objectInsideForm");
objectNotInsideForm = document.getElementById("objectNotInsideForm");
form = document.getElementById("form");
if(objectInsideForm.form == form)
print("Passed");
else
print("Failed");
if(objectNotInsideForm.form == null)
print("Passed");
else
print("Failed");
}
</script>
</head>
<body onload="test();">
<p>This test attempts to access an HTMLObjectElement's form property. The first test accesses the form property of an object which is inside of a form. The second test accesses the form property of an object which is not inside of a form</p>
<div id="console"></div>
<form id="form">
<object id="objectInsideForm">
</object>
</form>
<object id="objectNotInsideForm">
</object>
</body>
</html>