blob: cffec19d56a32f4b19eac363bbf48e66d9bcda1e [file] [log] [blame]
<!doctype html>
<meta charset="utf-8">
<title>Fetch: handling different schemes in redirects</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
// All non-HTTP(S) schemes cannot survive redirects
var url = "../resources/redirect.py?location=";
var tests = [
url + "mailto:a@a.com",
url + "data:,HI",
url + "facetime:a@a.org",
url + "about:blank",
url + "about:unicorn",
url + "blob:djfksfjs"
];
tests.forEach(function(url) {
promise_test(function(test) {
return promise_rejects(test, new TypeError(), fetch(url))
})
})
</script>