OLD | NEW |
1 <html> | 1 <html> |
2 <body> | 2 <body> |
3 <p>This tests that a javascript: URL loaded in an iframe inside another java
script: URL loaded iframe has access to the main frame.</p> | 3 <p>This tests that a javascript: URL loaded in an iframe inside another java
script: URL loaded iframe has access to the main frame.</p> |
4 <iframe id="aFrame" style="width: 500px; height: 300px;"></iframe> | 4 <iframe id="aFrame" name="aFrame" style="width: 500px; height: 300px;"></ifr
ame> |
5 <p id='accessMe'>FAIL: Cross frame access from a javascript: URL inside anot
her javascript: URL was denied.</p> | 5 <p id='accessMe'>FAIL: Cross frame access from a javascript: URL inside anot
her 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 innerURL = 'javascript:\\\"<html>' | 12 var innerURL = 'javascript:\\\"<html>' |
13 + "<scr" + "ipt>" | 13 + "<scr" + "ipt>" |
14 + 'top.document.getElementById(\\\\\\\"accessMe\\\\\\\").innerHT
ML = \\\\\\\"PASS: Cross frame access from a javascript: URL inside another java
script: URL was allowed!\\\\\\\";' | 14 + 'top.document.getElementById(\\\\\\\"accessMe\\\\\\\").innerHT
ML = \\\\\\\"PASS: Cross frame access from a javascript: URL inside another java
script: URL was allowed!\\\\\\\";' |
15 + "</scri" + "pt>" | 15 + "</scri" + "pt>" |
16 + "<body>" | 16 + "<body>" |
17 + "<p>Inner-inner iframe.</p>" | 17 + "<p>Inner-inner iframe.</p>" |
18 + "</body>" | 18 + "</body>" |
19 + '</html>\\\"'; | 19 + '</html>\\\"'; |
20 | 20 |
21 var url = "javascript:\"<html>" | 21 var url = "javascript:\"<html>" |
22 + "<body>" | 22 + "<body>" |
23 + "<iframe src='" + innerURL + "'></iframe>" | 23 + "<iframe src='" + innerURL + "'></iframe>" |
24 + "<p>Inner iframe.</p>" | 24 + "<p>Inner iframe.</p>" |
25 + "</body>" | 25 + "</body>" |
26 + "</html>\""; | 26 + "</html>\""; |
27 | 27 |
28 var iframe = document.getElementById("aFrame"); | 28 var iframe = document.getElementById("aFrame"); |
29 iframe.src = url; | 29 iframe.src = url; |
30 </script> | 30 </script> |
31 </body> | 31 </body> |
32 </html> | 32 </html> |
OLD | NEW |