OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="resources/cross-frame-access.js"></script> | 3 <script src="resources/cross-frame-access.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <iframe id="aFrame"></iframe> | 6 <iframe id="aFrame" name="aFrame"></iframe> |
7 <pre id="console"></pre> | 7 <pre id="console"></pre> |
8 <script> | 8 <script> |
9 // Explicitly set the domain. | 9 // Explicitly set the domain. |
10 document.domain = "127.0.0.1"; | 10 document.domain = "127.0.0.1"; |
11 | 11 |
12 var url = "http://127.0.0.1:8000/security/resources/cross-frame-iframe.html"
; | 12 var url = "http://127.0.0.1:8000/security/resources/cross-frame-iframe.html"
; |
13 var iframeId ="aFrame"; | 13 var iframeId ="aFrame"; |
14 var passMessage = "PASS: Cross frame access from frame explicitly setting do
cument.domain was denied."; | 14 var passMessage = "PASS: Cross frame access from frame explicitly setting do
cument.domain was denied."; |
15 var failMessage = "Fail: Cross frame access from frame explicitly setting do
cument.domain was allowed."; | 15 var failMessage = "Fail: Cross frame access from frame explicitly setting do
cument.domain was allowed."; |
16 cannotAccessFrame(url, iframeId, passMessage, failMessage); | 16 cannotAccessFrame(url, iframeId, passMessage, failMessage); |
17 </script> | 17 </script> |
18 </body> | 18 </body> |
19 </html> | 19 </html> |
OLD | NEW |