Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /connection-allowlist/tentative/link_header_modulepreload_allow.sub.window.html - WPT Dashboard Interop Dashboard
// META: script=/common/utils.js
// META: script=resources/utils.js
//
// The test assumes the policy `Connection-Allowlist: (response-origin)` has
// been set in the response. The response also contains a link header that
// triggers a modulepreload to the same-origin KV server at
promise_test(async () => {
const result =
await nextValueFromServer('bb906791-f686-45f9-9bb7-4de2352ce382');
assert_equals(result, 'hello');
}, 'Link header modulepreload to an allow-listed url succeeds.');