| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <body> | 2 <body> |
| 3 <p>Frame on a foreign domain (opened using window.open).</p> | 3 <p>Frame on a foreign domain (opened using window.open).</p> |
| 4 <iframe id="aFrame"></iframe> | 4 <iframe id="aFrame"></iframe> |
| 5 <script> | 5 <script> |
| 6 var url = "data:text/html,<html>" | 6 var url = "data:text/html,<html>" |
| 7 + "<head>" | 7 + "<head>" |
| 8 + "<scr" + "ipt>" | 8 + "<scr" + "ipt>" |
| 9 + "window.onload = function()" | 9 + "window.onload = function()" |
| 10 + "{" | 10 + "{" |
| 11 + "try {" | 11 + "try {" |
| 12 + "parent.opener.document.getElementById('accessMe')
.innerHTML = 'FAIL: Cross frame access from a data: URL on a different domain wa
s allowed';" | 12 + "parent.opener.document.getElementById('accessMe')
.innerHTML = 'FAIL: Cross frame access from a data: URL on a different domain wa
s allowed';" |
| 13 + "alert('FAIL: No exception thrown.');" | 13 + "alert('FAIL: No exception thrown.');" |
| 14 + "} catch (e) {" | 14 + "} catch (e) {" |
| 15 + "alert('PASS: Exception thrown successfully.');" | 15 + "alert('PASS: Exception thrown successfully.');" |
| 16 + "}" | 16 + "}" |
| 17 + "if (window.testRunner)" | 17 + "window.parent.opener.postMessage('done', '*');" |
| 18 + "testRunner.globalFlag = true;" | |
| 19 + "}" | 18 + "}" |
| 20 + "</scri" + "pt>" | 19 + "</scri" + "pt>" |
| 21 + "</head>" | 20 + "</head>" |
| 22 + "<body>" | 21 + "<body>" |
| 23 + "<p>Inner-inner iframe. This iframe (which is data: URL and wh
ose parent is on a foreign domain) is the frame attempting to access" | 22 + "<p>Inner-inner iframe. This iframe (which is data: URL and wh
ose parent is on a foreign domain) is the frame attempting to access" |
| 24 + " the main frame. It should not have access to it.</p>" | 23 + " the main frame. It should not have access to it.</p>" |
| 25 + "</body>" | 24 + "</body>" |
| 26 + "</html>"; | 25 + "</html>"; |
| 27 | 26 |
| 28 var frame = document.getElementById('aFrame'); | 27 var frame = document.getElementById('aFrame'); |
| 29 frame.src = url; | 28 frame.src = url; |
| 30 </script> | 29 </script> |
| 31 </body> | 30 </body> |
| 32 </html> | 31 </html> |
| OLD | NEW |