blob: 4ca67c1aa2c0e36168a0a2f363149dc6557a65b9 [file] [log] [blame]
<!DOCTYPE html>
<head>
<title>Test console messages for serving constraints violation of subresource Web Bundles</title>
</head>
<body>
<script>
(async () => {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
// Delay running the test until "didFinishLoadForFrame" is printed.
// This is intended to avoid the flakiness of the result outputs.
await new Promise((resolve) => {
window.addEventListener('load', () => setTimeout(resolve, 0));
});
if (!document.createElement('link').relList.supports('webbundle')) {
console.error("Subresource Web Bundles is not supported");
testRunner.notifyDone();
return;
}
await new Promise((resolve, reject) => {
const link = document.createElement('link');
link.rel = 'webbundle';
link.href = '../resources/wbn/hello.wbn-wrong-mime-type';
link.addEventListener('error', resolve);
document.body.appendChild(link);
});
await new Promise((resolve, reject) => {
const link = document.createElement('link');
link.rel = 'webbundle';
link.href = '../resources/wbn/hello.wbn-without-nosniff';
link.addEventListener('error', resolve);
document.body.appendChild(link);
});
testRunner.notifyDone();
})();
</script>
</body>