Make Request throw less often (fixes #13457)

This commit is contained in:
Mathieu Hordesseaux 2016-10-03 13:43:59 +02:00 committed by Josh Matthews
parent ec5ed8edfd
commit 6f97ce826b
6 changed files with 15 additions and 29 deletions

View file

@ -164191,7 +164191,7 @@
"testharness"
],
"fetch/api/request/request-error.html": [
"bfd03777a43be514a0839ab14f5206f486332fdb",
"ff308916884f69b3f4aa8f2017c4d9fe0caf0f00",
"testharness"
],
"fetch/api/request/request-headers.html": [
@ -164203,7 +164203,7 @@
"testharness"
],
"fetch/api/request/request-init-001.sub.html": [
"096424b40f6a21e989a6a5d8684b29ee8cbb963e",
"49bc4349b4e7a85d88cacd54227355aa986535f1",
"testharness"
],
"fetch/api/request/request-init-002.html": [

View file

@ -1,20 +1,10 @@
[request-init-001.sub.html]
type: testharness
[Check referrer init value of about:client and associated getter]
expected: FAIL
[Check referrer init value of and associated getter]
expected: FAIL
[Check referrerPolicy init value of and associated getter]
expected: FAIL
[Check referrer init value of http://test.url and associated getter]
expected: FAIL
[Check referrerPolicy init value of same-origin and associated getter]
expected: FAIL
[Check mode init value of navigate and associated getter]
expected: FAIL

View file

@ -2,7 +2,3 @@
type: testharness
[Request has arrayBuffer method]
expected: FAIL
[Check referrer attribute]
expected: FAIL

View file

@ -26,6 +26,11 @@
"Expect TypeError exception");
},"Input URL has credentials");
test(function() {
assert_throws(new TypeError() , function() { new Request("", {"mode" : "navigate"}); },
"Expect TypeError exception");
},"RequestInit's mode is navigate");
test(function() {
assert_throws(new TypeError() , function() { new Request("", {"referrer" : "http://:not a valid URL"}); },
"Expect TypeError exception");

View file

@ -49,8 +49,8 @@
"strict-origin-when-cross-origin"
]
};
var modes = {"givenValues" : ["same-origin", "no-cors", "cors", "navigate"],
"expectedValues" : ["same-origin", "no-cors", "cors", "same-origin"]
var modes = {"givenValues" : ["same-origin", "no-cors", "cors"],
"expectedValues" : ["same-origin", "no-cors", "cors"]
};
var credentials = {"givenValues" : ["omit", "same-origin", "include"],
"expectedValues" : ["omit", "same-origin", "include"]