blob: b94d8b7f6359a7d58bc1f19d3c55e40082925935 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// META: script=/fetch/orb/resources/utils.js
const path = "http://{{domains[www1]}}:{{ports[http][0]}}/fetch/orb/resources";
promise_test(
t =>
promise_rejects_js(
t,
TypeError,
fetchORB(
`${path}/data.json`,
null,
contentType("application/json"),
"status(206)"
)
),
"ORB should block opaque-response-blocklisted MIME type with status 206"
);
promise_test(
t =>
promise_rejects_js(
t,
TypeError,
fetchORB(
`${path}/data.json`,
null,
contentType("application/json"),
"status(302)"
)
),
"ORB should block opaque response with non-ok status"
);
|