| OLD | NEW | 
 | (Empty) | 
|   1 <html> |  | 
|   2 <head> |  | 
|   3     <script src="../resources/cross-frame-access.js"></script> |  | 
|   4     <script> |  | 
|   5         if (window.testRunner) { |  | 
|   6             testRunner.dumpAsText(); |  | 
|   7             testRunner.waitUntilDone(); |  | 
|   8             testRunner.setCanOpenWindows(); |  | 
|   9         } |  | 
|  10  |  | 
|  11         var openedWindow; |  | 
|  12  |  | 
|  13         function loaded() { |  | 
|  14             var url = "data:text/html,<html>" |  | 
|  15                 + "<head>" |  | 
|  16                 +     "<scr" + "ipt>" |  | 
|  17                 +         "function fireSentinel() {" |  | 
|  18                 +             "window.opener.postMessage('done', '*');" |  | 
|  19                 +         "}" |  | 
|  20                 +     "</scr" + "ipt>" |  | 
|  21                 + "</head>" |  | 
|  22                 + "<body onload=\"fireSentinel();\">" |  | 
|  23                 +     "<p>Opened Frame</p>" |  | 
|  24                 +     "<p id='accessMe'>PASS: Cross frame access from an opener 
    frame was denied</p>" |  | 
|  25                 + "</body>" |  | 
|  26                 + "</html>"; |  | 
|  27      |  | 
|  28             window.addEventListener('message', performTest); |  | 
|  29             openedWindow = window.open(url); |  | 
|  30         } |  | 
|  31      |  | 
|  32         function performTest() { |  | 
|  33             try { |  | 
|  34                 openedWindow.document.getElementById('accessMe').innerHTML = 'FA
    IL: Access to a window opened with a data: URL was allowed.'; |  | 
|  35             } catch (e) { |  | 
|  36             } |  | 
|  37  |  | 
|  38             if (window.testRunner) |  | 
|  39                 closeWindowAndNotifyDone(openedWindow); |  | 
|  40         }     |  | 
|  41     </script> |  | 
|  42 </head> |  | 
|  43 <body onload="loaded();"> |  | 
|  44     <p>Opener Frame</p> |  | 
|  45     <pre id="console"></pre> |  | 
|  46 </body> |  | 
|  47 </html> |  | 
| OLD | NEW |