Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /shared-storage/shared-storage-writable-fetch-request-for-data-url.tentative.https.sub.html - WPT Dashboard Interop Dashboard
<!doctype html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
'use strict';
promise_test(async t => {
const innerCode =
`window.parent.postMessage({fetchStatus: "success"}, '*');`;
const dataURL = 'data:text/javascript;base64,'
+ btoa(unescape(encodeURIComponent(innerCode)));
await promise_rejects_js(t, TypeError,
fetch(dataURL, {sharedStorageWritable: true}));
}, 'shared storage fetch request disallowed for data URL');
</script>
</body>