Move LinkProcessingOptions into separate file (#39033)

This makes future implementations easier where we will reuse most of
this code to parse Link headers.

Part of #35035

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe 2025-09-02 18:31:39 +02:00 committed by GitHub
parent efe9ea2306
commit a1f9e3e133
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 311 additions and 573 deletions

View file

@ -1,10 +1,6 @@
[prefetch-allowed-by-any-directive.sub.html]
expected: TIMEOUT
[Prefetch should succeed when restricted by default-src but allowed by other directive]
expected: TIMEOUT
[Prefetch should fail when restricted by default-src and different origin allowed by other directive]
expected: NOTRUN
expected: FAIL
[Prefetch should succeed when restricted by default-src but origin allowed by other directive]
expected: NOTRUN
expected: FAIL

View file

@ -1,4 +1,3 @@
[prefetch-allowed-by-default.html]
expected: TIMEOUT
[Prefetch should succeed when allowed by default-src]
expected: TIMEOUT
expected: FAIL

View file

@ -1,4 +1,3 @@
[prefetch-allowed-no-default.html]
expected: TIMEOUT
[Prefetch should succeed when there is no default-src]
expected: TIMEOUT
expected: FAIL

View file

@ -1,4 +1,3 @@
[prefetch-allowed-with-conflicting-permissive-policies.html]
expected: TIMEOUT
[Prefetch should succeed when a directive in a policy is permissive, even if a subsequent policy overrides that.]
expected: TIMEOUT
expected: FAIL

View file

@ -1,4 +0,0 @@
[prefetch-blocked-by-default-multiple-policies.html]
expected: TIMEOUT
[Prefetch should fail when restricted by default-src]
expected: TIMEOUT

View file

@ -1,4 +0,0 @@
[prefetch-blocked-by-default.html]
expected: TIMEOUT
[Prefetch should fail when restricted by default-src]
expected: TIMEOUT

View file

@ -1,79 +1,72 @@
[prefetch-generate-directives.html]
expected: TIMEOUT
[Test that script-src enabled with everything else disabled allows prefetching]
expected: TIMEOUT
expected: FAIL
[Test that script-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that img-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that img-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that connect-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that connect-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that object-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that object-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that font-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that font-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that manifest-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that manifest-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that media-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that media-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that style-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that style-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that child-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that child-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that frame-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that frame-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that worker-src enabled with everything else disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that worker-src enabled with default-src disabled allows prefetching]
expected: NOTRUN
[Test that base-uri enabled with everything else disabled allows prefetching]
expected: NOTRUN
[Test that base-uri enabled with default-src disabled allows prefetching]
expected: NOTRUN
expected: FAIL
[Test that permissive script-src-elem supersedes script-src]
expected: NOTRUN
expected: FAIL
[Test that permissive script-src supersedes script-src-elem]
expected: NOTRUN
expected: FAIL

View file

@ -1,4 +0,0 @@
[prefetch-ignores-prefetch-src.sub.html]
expected: TIMEOUT
[Prefetch should fail when restricted by default-src and allowed by unsupported prefetch-src directive (prefetch-src should be ignored)]
expected: TIMEOUT

View file

@ -1,4 +1,3 @@
[prefetch-no-csp.html]
expected: TIMEOUT
[Prefetch succeeds when no CSP]
expected: TIMEOUT
expected: FAIL