Skip to content

Commit

Permalink
Bug 1466075 [wpt PR 11291] - Test identity encoding for range request…
Browse files Browse the repository at this point in the history
…s, a=testonly

Automatic update from web-platform-testsFetch: test identity encoding for range requests

For whatwg/fetch#751.
--

wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39
wpt-pr: 11291

UltraBlame original commit: 954f7290ff43966a30c2ab2806e6841ab3618059
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent a6302ac commit d12507a
Show file tree
Hide file tree
Showing 8 changed files with 1,144 additions and 178 deletions.
24 changes: 9 additions & 15 deletions testing/web-platform/meta/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -2062178,9 +2062178,7 @@ fetch
/
range
/
partial
-
script
general
.
window
.
Expand All @@ -2062195,9 +2062193,7 @@ fetch
/
range
/
partial
-
script
general
.
window
.
Expand Down Expand Up @@ -3763872,7 +3763868,7 @@ js
:
[
"
2c16c0398373fca53ae80aae1107868c8cdeb6b4
ad1cdfc3bdcd8e713f27831f6f08c4213726ccfb
"
"
testharness
Expand All @@ -3763883,9 +3763879,7 @@ fetch
/
range
/
partial
-
script
general
.
window
.
Expand All @@ -3763894,7 +3763888,7 @@ js
:
[
"
1352080860b8671290919ab0d09cb41f4100763e
1ce131a5aa6815d9a6bb7f4a9f2004c33d28dacd
"
"
testharness
Expand Down Expand Up @@ -3763936,7 +3763930,7 @@ py
:
[
"
a9bdaefeb4e9cefd4bb678832d7ffcbe1b3167f7
b3e9951b240ccd97756eb6c65651223d40c78cd3
"
"
support
Expand Down Expand Up @@ -3763980,7 +3763974,7 @@ js
:
[
"
1ec66e1dd8bf9a11b058b90e32ca7caab2233d4d
24fd34bdf1331eb908e0a2144f4c84af357c9fa3
"
"
support
Expand Down Expand Up @@ -3764022,7 +3764016,7 @@ js
:
[
"
81cc493a76265cc64408fc2d41a67434ec99391a
fd2e57888fa9c18d46a2a4d7c9857d6cb99d087b
"
"
support
Expand All @@ -3764044,7 +3764038,7 @@ js
:
[
"
5bf1ebc9ce82990013831f2f7f55589e29a69bde
32cc96656190618f73951d577abe948b45abb777
"
"
testharness
Expand Down
205 changes: 205 additions & 0 deletions testing/web-platform/tests/fetch/range/general.any.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/
/
META
:
script
=
/
common
/
utils
.
js
/
/
Helpers
that
return
Expand Down Expand Up @@ -427,3 +439,196 @@ no
cors
)
;
promise_test
(
async
(
)
=
>
{
const
wavURL
=
new
URL
(
'
resources
/
long
-
wav
.
py
'
location
)
;
const
stashTakeURL
=
new
URL
(
'
resources
/
stash
-
take
.
py
'
location
)
;
function
changeToken
(
)
{
const
stashToken
=
token
(
)
;
wavURL
.
searchParams
.
set
(
'
accept
-
encoding
-
key
'
stashToken
)
;
stashTakeURL
.
searchParams
.
set
(
'
key
'
stashToken
)
;
}
const
rangeHeaders
=
[
'
bytes
=
0
-
10
'
'
foo
=
0
-
10
'
'
foo
'
'
'
]
;
for
(
const
rangeHeader
of
rangeHeaders
)
{
changeToken
(
)
;
await
fetch
(
wavURL
{
headers
:
{
Range
:
rangeHeader
}
}
)
;
const
response
=
await
fetch
(
stashTakeURL
)
;
assert_equals
(
await
response
.
json
(
)
'
identity
'
Expect
identity
accept
-
encoding
if
range
header
is
{
JSON
.
stringify
(
rangeHeader
)
}
)
;
}
}
Fetch
with
range
header
will
be
sent
with
Accept
-
Encoding
:
identity
)
;
Loading

0 comments on commit d12507a

Please sign in to comment.