| <script src="../resources/cross-frame-access.js"></script> |
| testRunner.waitUntilDone(); |
| testRunner.setCanOpenWindows(); |
| var url = "data:text/html,<html>" |
| + "function fireSentinel() {" |
| + "if (window.testRunner)" |
| + "testRunner.globalFlag = true;" |
| + "<body onload=\"fireSentinel();\">" |
| + "<p id='accessMe'>PASS: Cross frame access from an opener frame was denied</p>" |
| openedWindow = window.open(url); |
| setTimeout(waitForFlag, 1); |
| if (!testRunner.globalFlag) { |
| setTimeout(waitForFlag, 1); |
| log("Click the button when all the subframes have finished loading."); |
| openedWindow.document.getElementById('accessMe').innerHTML = 'FAIL: Access to a window opened with a data: URL was allowed.'; |
| closeWindowAndNotifyDone(openedWindow); |
| <body onload="loaded();"> |
| <button onclick="performTest()">Test</button> |