-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1936249 [wpt PR 49617] - Add WPT test for Document-Policy: expect…
…-no-linked-resources, a=testonly Automatic update from web-platform-tests Add WPT test for Document-Policy: expect-no-linked-resources Add a tentative and optional test case for whatwg/html#10718. -- wpt-commits: e2df4d406f762be154339148fe953629493c28c5 wpt-pr: 49617 UltraBlame original commit: b1a14a183e2577943fca32880cea619e42f2980f
- Loading branch information
Showing
4 changed files
with
564 additions
and
0 deletions.
There are no files selected for viewing
331 changes: 331 additions & 0 deletions
331
...eculative-parsing/expect-no-linked-resources/no-speculative-fetch.tentative.optional.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,331 @@ | ||
< | ||
! | ||
DOCTYPE | ||
html | ||
> | ||
< | ||
meta | ||
charset | ||
= | ||
utf | ||
- | ||
8 | ||
> | ||
< | ||
title | ||
> | ||
Speculative | ||
parsing | ||
expect | ||
- | ||
no | ||
- | ||
linked | ||
- | ||
resources | ||
Document | ||
- | ||
Policy | ||
< | ||
/ | ||
title | ||
> | ||
< | ||
meta | ||
name | ||
= | ||
" | ||
timeout | ||
" | ||
content | ||
= | ||
" | ||
long | ||
" | ||
> | ||
< | ||
script | ||
src | ||
= | ||
/ | ||
resources | ||
/ | ||
testharness | ||
. | ||
js | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
/ | ||
resources | ||
/ | ||
testharnessreport | ||
. | ||
js | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
resources | ||
/ | ||
testdriver | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
resources | ||
/ | ||
testdriver | ||
- | ||
vendor | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
src | ||
= | ||
" | ||
/ | ||
common | ||
/ | ||
utils | ||
. | ||
js | ||
" | ||
> | ||
< | ||
/ | ||
script | ||
> | ||
< | ||
script | ||
> | ||
async | ||
function | ||
get_results | ||
( | ||
uuid | ||
) | ||
{ | ||
const | ||
response | ||
= | ||
await | ||
fetch | ||
( | ||
/ | ||
html | ||
/ | ||
syntax | ||
/ | ||
speculative | ||
- | ||
parsing | ||
/ | ||
expect | ||
- | ||
no | ||
- | ||
linked | ||
- | ||
resources | ||
/ | ||
resources | ||
/ | ||
stash | ||
. | ||
py | ||
? | ||
action | ||
= | ||
get | ||
& | ||
uuid | ||
= | ||
{ | ||
uuid | ||
} | ||
) | ||
; | ||
return | ||
await | ||
response | ||
. | ||
text | ||
( | ||
) | ||
; | ||
} | ||
promise_test | ||
( | ||
async | ||
( | ||
) | ||
= | ||
> | ||
{ | ||
const | ||
uuid | ||
= | ||
token | ||
( | ||
) | ||
; | ||
await | ||
test_driver | ||
. | ||
bless | ||
( | ||
' | ||
Open | ||
a | ||
URL | ||
with | ||
expect | ||
- | ||
no | ||
- | ||
linked | ||
- | ||
resources | ||
Document | ||
- | ||
Policy | ||
' | ||
) | ||
; | ||
const | ||
popup | ||
= | ||
window | ||
. | ||
open | ||
( | ||
/ | ||
html | ||
/ | ||
syntax | ||
/ | ||
speculative | ||
- | ||
parsing | ||
/ | ||
expect | ||
- | ||
no | ||
- | ||
linked | ||
- | ||
resources | ||
/ | ||
resources | ||
/ | ||
no | ||
- | ||
speculative | ||
- | ||
fetch | ||
. | ||
sub | ||
. | ||
html | ||
? | ||
pipe | ||
= | ||
sub | ||
& | ||
uuid | ||
= | ||
{ | ||
uuid | ||
} | ||
' | ||
_blank | ||
' | ||
) | ||
; | ||
await | ||
new | ||
Promise | ||
( | ||
resolve | ||
= | ||
> | ||
popup | ||
. | ||
addEventListener | ||
( | ||
' | ||
load | ||
' | ||
resolve | ||
) | ||
) | ||
; | ||
const | ||
result | ||
= | ||
await | ||
get_results | ||
( | ||
uuid | ||
) | ||
; | ||
assert_equals | ||
( | ||
result | ||
' | ||
' | ||
' | ||
speculative | ||
case | ||
fetched | ||
' | ||
) | ||
; | ||
} | ||
expect | ||
- | ||
no | ||
- | ||
linked | ||
- | ||
resources | ||
hint | ||
was | ||
ignored | ||
) | ||
; | ||
< | ||
/ | ||
script | ||
> |
Oops, something went wrong.