3 <script src="../resources/cross-frame-access.js"></script>
7 window.onload = function()
9 if (window.testRunner) {
10 testRunner.dumpAsText();
11 testRunner.setCanOpenWindows();
12 testRunner.waitUntilDone();
15 openedWindow = window.open("http://localhost:8000/security/javascriptURL/resources/foreign-domain-javascript-url-accessee-opened-frame.html");
17 if (window.testRunner) {
18 setTimeout(pollForTest, 1);
20 log("To run the test, click the button below when the opened window finishes loading.");
21 var button = document.createElement("button");
22 button.appendChild(document.createTextNode("Run Test"));
23 button.onclick = runTest;
24 document.body.appendChild(button);
28 pollForTest = function()
30 if (!testRunner.globalFlag) {
31 setTimeout(pollForTest, 1);
35 closeWindowAndNotifyDone(openedWindow);
41 openedWindow[0].document.getElementById('accessMe').innerHTML = "FAIL: Cross frame access to a javascript: URL embed in a frame window.open'ed on foreign domain allowed.";
42 log("FAIL: Cross frame access to a javascript: URL embed in a frame window.open'ed on foreign domain allowed.");
46 log("PASS: Cross frame access to a javascript: URL embed in a frame window.open'ed on foreign domain denied!");
51 <pre id="console"></pre>