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 <script> | 4 <script> |
5 var openedWindow; | 5 var openedWindow; |
6 | 6 |
7 window.onload = function() | 7 window.onload = function() |
8 { | 8 { |
9 if (window.testRunner) { | 9 if (window.testRunner) { |
10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
11 testRunner.setCanOpenWindows(); | 11 testRunner.setCanOpenWindows(); |
12 testRunner.waitUntilDone(); | 12 testRunner.waitUntilDone(); |
13 } | 13 } |
14 | 14 |
15 openedWindow = window.open("http://localhost:8000/security/javascrip
tURL/resources/foreign-domain-javascript-url-accessor-opened-frame.html"); | 15 openedWindow = window.open("http://localhost:8000/security/javascrip
tURL/resources/foreign-domain-javascript-url-accessor-opened-frame.html"); |
16 | 16 |
17 if (window.testRunner) { | 17 window.addEventListener('message', function () |
18 setTimeout(pollUntilDone, 1); | 18 { |
19 } | 19 closeWindowAndNotifyDone(openedWindow); |
20 } | 20 }); |
21 | |
22 pollUntilDone = function() | |
23 { | |
24 if (!testRunner.globalFlag) { | |
25 setTimeout(pollUntilDone, 1); | |
26 return; | |
27 } | |
28 closeWindowAndNotifyDone(openedWindow); | |
29 } | 21 } |
30 </script> | 22 </script> |
31 </head> | 23 </head> |
32 <body> | 24 <body> |
33 <p>Opener Frame</p> | 25 <p>Opener Frame</p> |
34 <p id='accessMe'>Pass: Cross frame access from a javascript: URL on a differ
ent domain was denied.</p> | 26 <p id='accessMe'>Pass: Cross frame access from a javascript: URL on a differ
ent domain was denied.</p> |
35 <pre id='console'></pre> | 27 <pre id='console'></pre> |
36 </body> | 28 </body> |
37 </html> | 29 </html> |
OLD | NEW |