Implement basics of link preloading (#37036)

These changes allow a minimal set of checks for font-src
CSP checks to pass.

Part of #4577
Part of #35035

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe 2025-05-29 13:26:27 +02:00 committed by GitHub
parent 9dc1391bef
commit 36e4886da1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
174 changed files with 2814 additions and 1097 deletions

View file

@ -0,0 +1,85 @@
[modulepreload.html]
expected: TIMEOUT
[link rel=modulepreload]
expected: TIMEOUT
[same-origin link rel=modulepreload crossorigin=anonymous]
expected: NOTRUN
[same-origin link rel=modulepreload crossorigin=use-credentials]
expected: NOTRUN
[cross-origin link rel=modulepreload]
expected: NOTRUN
[cross-origin link rel=modulepreload crossorigin=anonymous]
expected: NOTRUN
[cross-origin link rel=modulepreload crossorigin=use-credentials]
expected: NOTRUN
[link rel=modulepreload with submodules]
expected: NOTRUN
[link rel=modulepreload for a module with syntax error]
expected: NOTRUN
[link rel=modulepreload for a module with network error]
expected: NOTRUN
[link rel=modulepreload with bad href attribute]
expected: NOTRUN
[link rel=modulepreload as=script]
expected: NOTRUN
[link rel=modulepreload with non-script-like as= value (image)]
expected: NOTRUN
[link rel=modulepreload with non-script-like as= value (xslt)]
expected: NOTRUN
[link rel=modulepreload with integrity match]
expected: NOTRUN
[link rel=modulepreload with integrity match2]
expected: NOTRUN
[link rel=modulepreload with integrity mismatch]
expected: NOTRUN
[link rel=modulepreload with integrity mismatch2]
expected: NOTRUN
[link rel=modulepreload with integrity mismatch3]
expected: NOTRUN
[multiple link rel=modulepreload with same href]
expected: NOTRUN
[multiple link rel=modulepreload with child module before parent]
expected: NOTRUN
[link rel=modulepreload with matching media]
expected: NOTRUN
[link rel=modulepreload with non-matching media]
expected: NOTRUN
[link rel=modulepreload with empty media]
expected: NOTRUN
[link rel=modulepreload with empty href]
expected: NOTRUN
[link rel=modulepreload with empty href and invalid as= value]
expected: NOTRUN
[link rel=modulepreload and script with non-matching crossorigin values]
expected: NOTRUN
[link rel=modulepreload and script with non-matching crossorigin values2]
expected: NOTRUN
[link rel=modulepreload and non-module script]
expected: NOTRUN