<!DOCTYPE html>
<html>
<script>
function test()
{
    if (window.testRunner) {
        testRunner.dumpAsText();
        var frame = document.getElementById("frame");
        frame.contentWindow.focus();
        testRunner.evaluateScriptInIsolatedWorld(0, "alert('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>
