Last active
December 12, 2015 09:48
-
-
Save mikewest/4753771 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONSOLE MESSAGE: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-location-get-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-location-minimal.html. Domains, protocols and ports must match. | |
CONSOLE MESSAGE: line 20: Exception! TypeError | |
Exception! TypeError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONSOLE MESSAGE: Unsafe JavaScript attempt to access frame with URL http://localhost:8000/security/resources/cross-frame-iframe-for-location-get-test.html from frame with URL http://127.0.0.1:8000/security/cross-frame-access-location-minimal.html. Domains, protocols and ports must match. | |
CONSOLE MESSAGE: line 20: Exception! SecurityError | |
Exception! SecurityError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
if (window.testRunner) { | |
testRunner.dumpAsText(); | |
testRunner.waitUntilDone(); | |
} | |
window.onload = function () { | |
var frame = document.querySelector('iframe'); | |
frame.onload = test; | |
frame.src = "http://localhost:8000/security/resources/cross-frame-iframe-for-location-get-test.html"; | |
}; | |
function test() { | |
var target = frames[0]; | |
try { | |
target.location.href; | |
console.log('No exception!'); | |
document.getElementById('output').innerText = "No exception! "; | |
} catch (e) { | |
console.log('Exception! ' + e.name); | |
document.getElementById('output').innerText = "Exception! " + e.name; | |
} | |
if (window.testRunner) | |
testRunner.notifyDone(); | |
} | |
</script> | |
<iframe></iframe> | |
<pre id="output"></pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment