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,148 @@
[preload-resource-match.https.html]
expected: TIMEOUT
[Loading image (no-cors) with link (anonymous) should discard the preloaded response]
expected: FAIL
[Loading image (no-cors) with link (use-credentials) should discard the preloaded response]
expected: FAIL
[Loading image (anonymous) with link (no-cors) should discard the preloaded response]
expected: FAIL
[Loading image (anonymous) with link (use-credentials) should discard the preloaded response]
expected: FAIL
[Loading image (use-credentials) with link (no-cors) should discard the preloaded response]
expected: FAIL
[Loading image (use-credentials) with link (anonymous) should discard the preloaded response]
expected: FAIL
[Loading font (anonymous) with link (no-cors) should discard the preloaded response]
expected: FAIL
[Loading font (anonymous) with link (anonymous) should reuse the preloaded response]
expected: FAIL
[Loading font (anonymous) with link (use-credentials) should discard the preloaded response]
expected: FAIL
[Loading font (same-origin) with link (same-origin) should reuse the preloaded response]
expected: FAIL
[Loading backgroundImage (no-cors) with link (anonymous) should discard the preloaded response]
expected: FAIL
[Loading backgroundImage (no-cors) with link (use-credentials) should discard the preloaded response]
expected: FAIL
[Loading fetch (same-origin) with link (same-origin) should reuse the preloaded response]
expected: FAIL
[Loading fetch (no-cors) with link (no-cors) should reuse the preloaded response]
expected: FAIL
[Loading fetch (no-cors) with link (anonymous) should discard the preloaded response]
expected: FAIL
[Loading fetch (no-cors) with link (use-credentials) should discard the preloaded response]
expected: FAIL
[Loading fetch (anonymous) with link (no-cors) should discard the preloaded response]
expected: FAIL
[Loading fetch (anonymous) with link (anonymous) should reuse the preloaded response]
expected: FAIL
[Loading fetch (anonymous) with link (use-credentials) should discard the preloaded response]
expected: FAIL
[Loading fetch (use-credentials) with link (no-cors) should discard the preloaded response]
expected: FAIL
[Loading fetch (use-credentials) with link (anonymous) should discard the preloaded response]
expected: FAIL
[Loading fetch (use-credentials) with link (use-credentials) should reuse the preloaded response]
expected: FAIL
[Loading script (no-cors) with link (anonymous) should discard the preloaded response]
expected: FAIL
[Loading script (no-cors) with link (use-credentials) should discard the preloaded response]
expected: FAIL
[Loading script (anonymous) with link (no-cors) should discard the preloaded response]
expected: FAIL
[Loading script (anonymous) with link (use-credentials) should discard the preloaded response]
expected: FAIL
[Loading script (use-credentials) with link (no-cors) should discard the preloaded response]
expected: FAIL
[Loading script (use-credentials) with link (anonymous) should discard the preloaded response]
expected: TIMEOUT
[Loading script (use-credentials) with link (use-credentials) should reuse the preloaded response]
expected: NOTRUN
[Loading module (same-origin) with link (same-origin) should reuse the preloaded response]
expected: NOTRUN
[Loading module (no-cors) with link (no-cors) should reuse the preloaded response]
expected: NOTRUN
[Loading module (no-cors) with link (anonymous) should discard the preloaded response]
expected: NOTRUN
[Loading module (no-cors) with link (use-credentials) should discard the preloaded response]
expected: NOTRUN
[Loading module (anonymous) with link (no-cors) should discard the preloaded response]
expected: NOTRUN
[Loading module (anonymous) with link (anonymous) should reuse the preloaded response]
expected: NOTRUN
[Loading module (anonymous) with link (use-credentials) should discard the preloaded response]
expected: NOTRUN
[Loading module (use-credentials) with link (no-cors) should discard the preloaded response]
expected: NOTRUN
[Loading module (use-credentials) with link (anonymous) should discard the preloaded response]
expected: NOTRUN
[Loading module (use-credentials) with link (use-credentials) should reuse the preloaded response]
expected: NOTRUN
[Loading style (same-origin) with link (same-origin) should reuse the preloaded response]
expected: NOTRUN
[Loading style (no-cors) with link (no-cors) should reuse the preloaded response]
expected: NOTRUN
[Loading style (no-cors) with link (anonymous) should discard the preloaded response]
expected: NOTRUN
[Loading style (no-cors) with link (use-credentials) should discard the preloaded response]
expected: NOTRUN
[Loading style (anonymous) with link (no-cors) should discard the preloaded response]
expected: NOTRUN
[Loading style (anonymous) with link (anonymous) should reuse the preloaded response]
expected: NOTRUN
[Loading style (anonymous) with link (use-credentials) should discard the preloaded response]
expected: NOTRUN
[Loading style (use-credentials) with link (no-cors) should discard the preloaded response]
expected: NOTRUN
[Loading style (use-credentials) with link (anonymous) should discard the preloaded response]
expected: NOTRUN
[Loading style (use-credentials) with link (use-credentials) should reuse the preloaded response]
expected: NOTRUN