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,97 +1,93 @@
[element-link-prefetch.https.optional.sub.html]
expected: TIMEOUT
[sec-fetch-site - Same origin no attributes]
expected: TIMEOUT
expected: FAIL
[sec-fetch-site - Cross-site no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same site no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same-Origin -> Cross-Site -> Same-Origin redirect no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same-Origin -> Same-Site -> Same-Origin redirect no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Cross-Site -> Same Origin no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Cross-Site -> Same-Site no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Cross-Site -> Cross-Site no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same-Origin -> Same Origin no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same-Origin -> Same-Site no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same-Origin -> Cross-Site no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same-Site -> Same Origin no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same-Site -> Same-Site no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-site - Same-Site -> Cross-Site no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-mode no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-mode attributes: crossorigin]
expected: NOTRUN
expected: FAIL
[sec-fetch-mode attributes: crossorigin=anonymous]
expected: NOTRUN
expected: FAIL
[sec-fetch-mode attributes: crossorigin=use-credentials]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest no attributes]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=audio]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=document]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=embed]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=fetch]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=font]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=image]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=object]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=script]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=style]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=track]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=video]
expected: NOTRUN
expected: FAIL
[sec-fetch-dest attributes: as=worker]
expected: NOTRUN
[sec-fetch-user no attributes]
expected: NOTRUN
expected: FAIL

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

View file

@ -1,4 +0,0 @@
[prefetch-transfer-size-executor.html]
expected: TIMEOUT
[Navigation timing transfer size for a prefetched navigation should be 0.]
expected: TIMEOUT

View file

@ -1,4 +0,0 @@
[prefetch-transfer-size-iframe.html]
expected: TIMEOUT
[Navigation timing transfer size for a prefetched navigation should be 0.]
expected: TIMEOUT