зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1546041 - Throw TypeError if mode is Navigate r=baku
According to spec, we should throw TypeError if the mode is Navigate. Differential Revision: https://phabricator.services.mozilla.com/D31245 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
899bfb263a
Коммит
b53ba78d32
|
@ -322,9 +322,11 @@ already_AddRefed<Request> Request::Constructor(const GlobalObject& aGlobal,
|
|||
? aInit.mCredentials.Value()
|
||||
: fallbackCredentials;
|
||||
|
||||
if (mode == RequestMode::Navigate ||
|
||||
(aInit.IsAnyMemberPresent() &&
|
||||
request->Mode() == RequestMode::Navigate)) {
|
||||
if (mode == RequestMode::Navigate) {
|
||||
aRv.ThrowTypeError<MSG_INVALID_REQUEST_MODE>(NS_LITERAL_STRING("navigate"));
|
||||
return nullptr;
|
||||
}
|
||||
if (aInit.IsAnyMemberPresent() && request->Mode() == RequestMode::Navigate) {
|
||||
mode = RequestMode::Same_origin;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
[RequestInit's window is not null]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's mode is navigate]
|
||||
expected: FAIL
|
||||
|
||||
[RequestInit's mode is no-cors and integrity is not empty]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче