blob: eda3cee76b4e4d018e46cedd601e1785423dd40f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
window.jsTestIsAsync = true;
var allowedExecuted = 0;
var disallowedExecuted = 0;
window.addEventListener('message', function () {
allowedExecuted++;
finish();
});
function finish() {
shouldBe("disallowedExecuted", "0");
shouldBe("allowedExecuted", "1");
finishJSTest();
};
</script>
<script src="../../resources/js-test-post.js"></script>
</head>
<body>
<iframe sandbox="allow-same-origin allow-scripts allow-modals"
src="data:text/html,<script>console.log('PASS: Executed script in data URL');window.parent.postMessage({'pass': true}, '*');</script>">
</iframe>
<script>
description("Verify that sandboxed frames with sandbox='allow-scripts' can execute script from data: URLs.");
</script>
</body>
</html>