blob: b3fa3ee3706957ade1adecd8d794d33b16eb3234 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<iframe></iframe>
<p>
This tests that blob URLs created in a secure context are treated as secure
origins. This test passes if the iframe renders PASS correctly, and no
console warning appears.
</p>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFrames();
testRunner.waitUntilDone();
}
if (location.protocol != 'https:') {
location = 'https://127.0.0.1:8443/security/mixedContent/blob-url-in-iframe.html';
} else {
var iframe = document.querySelector('iframe');
iframe.onload = function () {
if (window.testRunner)
testRunner.notifyDone();
};
var b = new Blob(['<h1>PASS (1/1)</h1>'], { type: 'text/html' });
iframe.src = URL.createObjectURL(b);
}
</script>
</body>
</html>