-
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 1690610 [wpt PR 27463] - Fetch: redirects to data: URLs, a=testonly
Automatic update from web-platform-tests Fetch: redirects to data: URLs For whatwg/fetch#393. -- wpt-commits: 0cae3be3b2ba254b0cf40858b8cea6c7156090d7 wpt-pr: 27463 UltraBlame original commit: 0801f11d7e9c8a57cffb42cff0e04bc1e1e77a08
- Loading branch information
Showing
1 changed file
with
324 additions
and
0 deletions.
There are no files selected for viewing
324 changes: 324 additions & 0 deletions
324
testing/web-platform/tests/fetch/redirects/data.window.js
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,324 @@ | ||
async_test | ||
( | ||
t | ||
= | ||
> | ||
{ | ||
const | ||
img | ||
= | ||
document | ||
. | ||
createElement | ||
( | ||
" | ||
img | ||
" | ||
) | ||
; | ||
img | ||
. | ||
onload | ||
= | ||
t | ||
. | ||
unreached_func | ||
( | ||
) | ||
; | ||
img | ||
. | ||
onerror | ||
= | ||
t | ||
. | ||
step_func_done | ||
( | ||
) | ||
; | ||
img | ||
. | ||
src | ||
= | ||
" | ||
. | ||
. | ||
/ | ||
api | ||
/ | ||
resources | ||
/ | ||
redirect | ||
. | ||
py | ||
? | ||
location | ||
= | ||
data | ||
: | ||
image | ||
/ | ||
png | ||
% | ||
3Bbase64 | ||
iVBORw0KGgoAAAANSUhEUgAAAIUAAABqCAIAAAAdqgU8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF6SURBVHhe7dNBDQAADIPA | ||
% | ||
2Bje92eBxSQUQSLedlQzo0TLQonFWPVoGWjT | ||
% | ||
2BoUfLQIvGP | ||
/ | ||
RoGWjR | ||
% | ||
2BIceLQMtGv | ||
/ | ||
Qo2WgReMferQMtGj8Q4 | ||
% | ||
2BWgRaNf | ||
% | ||
2BjRMtCi8Q89WgZaNP6hR8tAi8Y | ||
/ | ||
9GgZaNH4hx4tAy0a | ||
/ | ||
9CjZaBF4x96tAy0aPxDj5aBFo1 | ||
/ | ||
6NEy0KLxDz1aBlo0 | ||
/ | ||
qFHy0CLxj | ||
/ | ||
0aBlo0fiHHi0DLRr | ||
/ | ||
0KNloEXjH3q0DLRo | ||
/ | ||
EOPloEWjX | ||
/ | ||
o0TLQovEPPVoGWjT | ||
% | ||
2BoUfLQIvGP | ||
/ | ||
RoGWjR | ||
% | ||
2BIceLQMtGv | ||
/ | ||
Qo2WgReMferQMtGj8Q4 | ||
% | ||
2BWgRaNf | ||
% | ||
2BjRMtCi8Q89WgZaNP6hR8tAi8Y | ||
/ | ||
9GgZaNH4hx4tAy0a | ||
/ | ||
9CjZaBF4x96tAy0aPxDj5aBFo1 | ||
/ | ||
6NEy0KLxDz1aBlo0 | ||
/ | ||
qFHy0CLxj | ||
/ | ||
0aBlo0fiHHi0DLRr | ||
/ | ||
0KNloEXjH3q0DLRo | ||
/ | ||
EOPloEWjX | ||
/ | ||
o0TLQovEPPVoGWjT | ||
% | ||
2BoUfLQIvGP | ||
/ | ||
RoGWjR | ||
% | ||
2BIceJQMPIOzeGc0PIDEAAAAASUVORK5CYII | ||
" | ||
; | ||
} | ||
" | ||
< | ||
img | ||
> | ||
fetch | ||
that | ||
redirects | ||
to | ||
data | ||
: | ||
URL | ||
" | ||
) | ||
; | ||
globalThis | ||
. | ||
globalTest | ||
= | ||
null | ||
; | ||
async_test | ||
( | ||
t | ||
= | ||
> | ||
{ | ||
globalThis | ||
. | ||
globalTest | ||
= | ||
t | ||
; | ||
const | ||
script | ||
= | ||
document | ||
. | ||
createElement | ||
( | ||
" | ||
script | ||
" | ||
) | ||
; | ||
script | ||
. | ||
src | ||
= | ||
" | ||
. | ||
. | ||
/ | ||
api | ||
/ | ||
resources | ||
/ | ||
redirect | ||
. | ||
py | ||
? | ||
location | ||
= | ||
data | ||
: | ||
text | ||
/ | ||
javascript | ||
( | ||
globalThis | ||
. | ||
globalTest | ||
. | ||
unreached_func | ||
( | ||
) | ||
) | ||
( | ||
) | ||
" | ||
; | ||
script | ||
. | ||
onerror | ||
= | ||
t | ||
. | ||
step_func_done | ||
( | ||
) | ||
; | ||
document | ||
. | ||
body | ||
. | ||
append | ||
( | ||
script | ||
) | ||
; | ||
} | ||
" | ||
< | ||
script | ||
> | ||
fetch | ||
that | ||
redirects | ||
to | ||
data | ||
: | ||
URL | ||
" | ||
) | ||
; | ||
async_test | ||
( | ||
t | ||
= | ||
> | ||
{ | ||
const | ||
client | ||
= | ||
new | ||
XMLHttpRequest | ||
( | ||
) | ||
; | ||
client | ||
. | ||
open | ||
( | ||
" | ||
GET | ||
" | ||
" | ||
. | ||
. | ||
/ | ||
api | ||
/ | ||
resources | ||
/ | ||
redirect | ||
. | ||
py | ||
? | ||
location | ||
= | ||
data | ||
: | ||
" | ||
) | ||
; | ||
client | ||
. | ||
send | ||
( | ||
) | ||
; | ||
client | ||
. | ||
onload | ||
= | ||
t | ||
. | ||
unreached_func | ||
( | ||
) | ||
; | ||
client | ||
. | ||
onerror | ||
= | ||
t | ||
. | ||
step_func_done | ||
( | ||
) | ||
; | ||
} | ||
" | ||
XMLHttpRequest | ||
fetch | ||
that | ||
redirects | ||
to | ||
data | ||
: | ||
URL | ||
" | ||
) | ||
; |