4 function print(message
) {
5 var paragraph
= document
.createElement("p");
6 paragraph
.appendChild(document
.createTextNode(message
));
7 document
.getElementById("console").appendChild(paragraph
);
11 if (window
.testRunner
) {
12 window
.testRunner
.dumpAsText();
15 print("frames[0].name (should be frame0_name): " + frames
[0].name
);
16 print("frames[0].id (should be undefined): " + frames
[0].id
);
19 delete frames
[0].name
; // force dynamic property creation
21 frames
[0].name
= "frame0_newname"
22 frames
[0].id
= "frame0_newid";
23 print("frames[0].name (should be frame0_newname): " + frames
[0].name
);
24 print("frames[0].id (should be frame0_newid): " + frames
[0].id
);
28 <body onload=
"test()">
29 <p>Tests: getting and setting frames[x].name on an iFrame
</p>
30 <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>
33 <iframe name=
"frame0_name" id=
"frame0_id"></iframe>