| <script src="../resources/cross-frame-access.js"></script> |
| testRunner.setCanOpenWindows(); |
| testRunner.waitUntilDone(); |
| var url = "data:text/html,<html>" |
| + "opener.document.getElementById(\"accessMe\").innerHTML = \"FAIL: Access from a window opened with a data: URL was allowed!\";" |
| + "if (window.testRunner)" |
| + "testRunner.globalFlag = true;" // Flag that the test has completed and we can close the window now |
| + "<body onload=\"test();\">" |
| var openedWindow = window.open(url); |
| setTimeout(waitForFlag, 1); |
| if (!testRunner.globalFlag) { |
| setTimeout(waitForFlag, 1); |
| closeWindowAndNotifyDone(openedWindow); |
| <body onload="loaded();"> |
| <p id='accessMe'>PASS: Access from a window opened with a data: URL was denied.</p> |