blob: 3689adb1d5e509bba60e36b3e8f72bf916c6e677 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.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>
</head>
<body>
<iframe sandbox="allow-same-origin allow-scripts"
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>