|
1 <html> |
|
2 <head> |
|
3 <script> |
|
4 var timerID = 0; |
|
5 function testDone() { |
|
6 clearTimeout(timerID); |
|
7 var l = document.body.firstChild.contentWindow.location.href; |
|
8 opener.is(l, "data:text/html,bar", "Should have loaded a new document"); |
|
9 opener.nextTest(); |
|
10 window.close(); |
|
11 } |
|
12 function test() { |
|
13 var ifr = document.getElementsByTagName("iframe")[0]; |
|
14 ifr.onload = testDone; |
|
15 ifr.contentWindow.location.hash = "b"; |
|
16 ifr.contentWindow.location.href = "data:text/html,bar"; |
|
17 history.back(); |
|
18 timerID = setTimeout(testDone, 2000); |
|
19 } |
|
20 </script> |
|
21 </head> |
|
22 <body onload="setTimeout(test, 0)"><iframe src="data:text/html,foo#a"></iframe> |
|
23 </body> |
|
24 </html> |