|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <head> |
|
4 <script> |
|
5 function load() { |
|
6 (window.opener || window.parent).innerLoaded(window); |
|
7 } |
|
8 |
|
9 function doXHR(req) { |
|
10 // Do a sync XHR and return the XHR's referrer. |
|
11 if (!req) { |
|
12 req = new XMLHttpRequest(); |
|
13 } |
|
14 |
|
15 // file_bug622088.sjs echos its referrer back to us. We need to refer to it |
|
16 // using an absolute URI because we sometimes pass in |req| from a window |
|
17 // which has a data: URI. In that case, a relative path would not get |
|
18 // resolved properly! |
|
19 // |
|
20 // Resolve our relative URI to an absolute one by creating an anchor element |
|
21 // and reading its href property. |
|
22 var anchor = document.createElement('a'); |
|
23 anchor.href = 'file_bug622088.sjs'; |
|
24 |
|
25 dump('anchor.href=' + anchor.href + '\n'); |
|
26 |
|
27 req.open('GET', anchor.href, false); |
|
28 req.send(null); |
|
29 return req.responseText; |
|
30 } |
|
31 </script> |
|
32 </head> |
|
33 |
|
34 <body onload='load()'> |
|
35 <!--Inner frame target for test_bug622088_2.html. --> |
|
36 </body> |
|
37 |
|
38 </html> |