|
1 <html> |
|
2 <head> |
|
3 <script> |
|
4 function test() { |
|
5 var ifr = document.createElement("iframe"); |
|
6 ifr.src = "frame0.html"; |
|
7 document.getElementById("dynamic").appendChild(ifr); |
|
8 var staticFrame = document.getElementById("staticframe"); |
|
9 staticFrame.onload = window.location = "goback.html"; |
|
10 staticFrame.contentWindow.location = "frame1.html"; |
|
11 } |
|
12 |
|
13 function start() { |
|
14 if (++opener.testCount == 1) { |
|
15 test(); |
|
16 } else { |
|
17 var staticFrame = document.getElementById("staticframe"); |
|
18 opener.ok(new String(staticFrame.contentWindow.location).indexOf(staticFrame.src) >= 0, |
|
19 "Wrong document loaded!"); |
|
20 opener.nextTest(); |
|
21 window.close(); |
|
22 } |
|
23 } |
|
24 </script> |
|
25 </head> |
|
26 <body onload="setTimeout('start()', 0)"> |
|
27 <h5>Dynamic</h5> |
|
28 <div id="dynamic"></div> |
|
29 <h5>Static</h5> |
|
30 <div id="static"><iframe id="staticframe" src="frame0.html"></iframe></div> |
|
31 </body> |
|
32 </html> |