Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /fetch/api/cors/sandboxed-iframe.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe sandbox="allow-scripts" src="../resources/sandboxed-iframe.html"></iframe>
<script>
promise_test(async (t) => {
const message = await new Promise((resolve) => {
window.addEventListener('message', e => resolve(e.data));
});
assert_equals(message, 'PASS');
}, 'CORS with sandboxed iframe');
</script>
</html>