blob: bed320b2b793c78a4c598d29f658a017874fb3d5 [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>alert('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>