Initial support for <link rel="prefetch"> (#33345)

* Properly store link relations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Send fetch request for prefetch links

We don't actually *do* anything with the response yet
(handle errors etc) but its a first step.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fire load/error events for prefetch loads

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Set prefetch destination/cors setting correctly

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix ./mach test-tidy errors

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Set correct "Accept" value for prefetch requests

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Add spec text to individual steps

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2024-09-09 20:52:56 +02:00 committed by GitHub
parent 2993577ac0
commit 10e5bb72d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 531 additions and 182 deletions

View file

@ -1,46 +1,6 @@
[element-link-prefetch.optional.sub.html]
expected: TIMEOUT
[sec-fetch-site - Not sent to non-trustworthy same-origin destination no attributes]
expected: TIMEOUT
[sec-fetch-site - Not sent to non-trustworthy same-site destination no attributes]
expected: NOTRUN
[sec-fetch-site - Not sent to non-trustworthy cross-site destination no attributes]
expected: NOTRUN
[sec-fetch-mode - Not sent to non-trustworthy same-origin destination no attributes]
expected: NOTRUN
[sec-fetch-mode - Not sent to non-trustworthy same-site destination no attributes]
expected: NOTRUN
[sec-fetch-mode - Not sent to non-trustworthy cross-site destination no attributes]
expected: NOTRUN
[sec-fetch-dest - Not sent to non-trustworthy same-origin destination no attributes]
expected: NOTRUN
[sec-fetch-dest - Not sent to non-trustworthy same-site destination no attributes]
expected: NOTRUN
[sec-fetch-dest - Not sent to non-trustworthy cross-site destination no attributes]
expected: NOTRUN
[sec-fetch-user - Not sent to non-trustworthy same-origin destination no attributes]
expected: NOTRUN
[sec-fetch-user - Not sent to non-trustworthy same-site destination no attributes]
expected: NOTRUN
[sec-fetch-user - Not sent to non-trustworthy cross-site destination no attributes]
expected: NOTRUN
[sec-fetch-site - HTTPS downgrade (header not sent) no attributes]
expected: NOTRUN
[sec-fetch-site - HTTPS upgrade no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - HTTPS downgrade-upgrade no attributes]
expected: NOTRUN
expected: FAIL