Skip to content

Commit 7f754bc

Browse files
KhafraDevronag
authored andcommitted
wpt: add redirect-schemes.any.js
1 parent 76d7095 commit 7f754bc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// META: title=Fetch: handling different schemes in redirects
2+
// META: global=window,worker
3+
// META: script=/common/get-host-info.sub.js
4+
5+
// All non-HTTP(S) schemes cannot survive redirects
6+
var url = "../resources/redirect.py?location=";
7+
var tests = [
8+
url + "mailto:[email protected]",
9+
url + "data:,HI",
10+
url + "facetime:[email protected]",
11+
url + "about:blank",
12+
url + "about:unicorn",
13+
url + "blob:djfksfjs"
14+
];
15+
tests.forEach(function(url) {
16+
promise_test(function(test) {
17+
return promise_rejects_js(test, TypeError, fetch(url))
18+
})
19+
})

0 commit comments

Comments
 (0)