blob: de32b01e501e9e3010c6956fa654f66c3fdcd1e5 [file] [log] [blame]
<!DOCTYPE html>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function run()
{
var check = "(function() {if (location.protocol == 'https:') console.log('FAIL: executed in iframe context'); else console.log('PASS: not executed in iframe context');})()"
var frame = document.body.appendChild(document.createElement("iframe"));
frame.src = "https://127.0.0.1:8443/security/resources/empty.html";
frame.onload = function() {
try {
window.open.call(frame.contentWindow);
} catch (e) {
e.constructor.constructor(check)();
}
try {
location.assign.call(frame.contentWindow.location);
} catch (e) {
e.constructor.constructor(check)();
}
try {
frame.contentWindow.opener = 1;
} catch (e) {
e.constructor.constructor(check)();
}
if (window.testRunner)
testRunner.notifyDone();
};
}
</script>
<body onload="run()">
Test passes if three "PASS" messages are logged to the console.
</body>