OLD | NEW |
1 <html> | 1 <html> |
2 <body> | 2 <body> |
3 <p>This tests that a javascript: URL loaded in an iframe has access to its p
arent's frame</p> | 3 <p>This tests that a javascript: URL loaded in an iframe has access to its p
arent's frame</p> |
4 <iframe id="aFrame"></iframe> | 4 <iframe id="aFrame" name="aFrame"></iframe> |
5 <p id='accessMe'>FAIL: Cross frame access from a javascript: URL was denied.
</p> | 5 <p id='accessMe'>FAIL: Cross frame access from a javascript: URL was denied.
</p> |
6 <script> | 6 <script> |
7 if (window.testRunner) { | 7 if (window.testRunner) { |
8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
9 testRunner.dumpChildFramesAsText(); | 9 testRunner.dumpChildFramesAsText(); |
10 } | 10 } |
11 | 11 |
12 var url = "javascript:\"<html>" | 12 var url = "javascript:\"<html>" |
13 + "<scr" + "ipt>" | 13 + "<scr" + "ipt>" |
14 + "parent.document.getElementById('accessMe').innerHTML = 'PASS:
Cross frame access from a javascript: URL was allowed!';" | 14 + "parent.document.getElementById('accessMe').innerHTML = 'PASS:
Cross frame access from a javascript: URL was allowed!';" |
15 + "</scri" + "pt>" | 15 + "</scri" + "pt>" |
16 + "<body>" | 16 + "<body>" |
17 + "<p>Inner iframe.</p>" | 17 + "<p>Inner iframe.</p>" |
18 + "</body>" | 18 + "</body>" |
19 + "</html>\""; | 19 + "</html>\""; |
20 | 20 |
21 var iframe = document.getElementById("aFrame"); | 21 var iframe = document.getElementById("aFrame"); |
22 iframe.src = url; | 22 iframe.src = url; |
23 </script> | 23 </script> |
24 </body> | 24 </body> |
25 </html> | 25 </html> |
OLD | NEW |