blob: ca9f12c17339375ce7f2da32f45e8af5b37c531a [file] [log] [blame]
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
async_test(t => {
assert_equals(location.protocol, "https:");
var f = document.createElement("iframe");
window.addEventListener("message", t.step_func(e => {
if (e.source !== f.contentWindow)
return;
assert_equals(e.data, "PASS");
t.done();
}));
f.src = "data:text/html," + encodeURIComponent(`
<script>
var url = URL.createObjectURL(new Blob(["parent.postMessage('PASS', '*');"]));
var s = document.createElement("script");
s.src = url;
document.head.appendChild(s);
<\/script>
`);
document.body.appendChild(f);
}, "'data:' URL frames can load 'blob:' resources.");
</script>
</body>