<html>
<head>
<script>
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();
}
print("frames[0].name (should be frame0_name): " + frames[0].name);
print("frames[0].id (should be undefined): " + frames[0].id);
print("");
delete frames[0].name; // force dynamic property creation
frames[0].name = "frame0_newname"
frames[0].id = "frame0_newid";
print("frames[0].name (should be frame0_newname): " + frames[0].name);
print("frames[0].id (should be frame0_newid): " + frames[0].id);
}
</script>
</head>
<body onload="test()">
<p>Tests: getting and setting frames[x].name on an iFrame</p>
<p>Related bug: <i>rdar://problem/4170960 https://bugs.webkit.org/show_bug.cgi?id=3952 <a href=https://bugs.webkit.org/show_bug.cgi?id=3952>iFrame name and id information incorrectly returned</a></i></p>
<hr>
<div id='console'/>
<iframe name="frame0_name" id="frame0_id"></iframe>
</body>
</html>