blob: 4c98ba0758b08d1be2e0aa986e3d4de64bd5a211 [file] [log] [blame]
<!DOCTYPE html>
<html>
<script>
function test()
{
if (window.testRunner) {
testRunner.dumpAsText();
var frame = document.getElementById("frame");
frame.contentWindow.focus();
testRunner.evaluateScriptInIsolatedWorld(1, "console.log('PASS');");
} else {
var msg = document.createElement("p");
msg.innerText = "FAIL: Test requires testRunner to run.";
document.body.appendChild(msg);
}
}
</script>
<body onload="test()">
<p>
Test that executing scripts in an isolated world works even inside sandboxed
iframes. The test passes, if an alert with the text "PASS" is shown.
</p>
<iframe id="frame" src="resources/fail.html" sandbox="allow-same-origin"></iframe>
</body>
</html>