summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/fetch/test_request.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-07-05 22:23:02 +0200
committerGitHub <noreply@github.com>2018-07-05 22:23:02 +0200
commit52d608c670c5c485cfe1139c40ec06d8ef460a26 (patch)
tree91d27a6911b77ae9e70ca3ba64929a92d6ea14ed /dom/tests/mochitest/fetch/test_request.js
parentc3fe7f59c8b6c1a23f5ae85f0697470fad560d68 (diff)
parent3815302230bc043f98667c1ee0de6dee15969034 (diff)
downloadUXP-52d608c670c5c485cfe1139c40ec06d8ef460a26.tar
UXP-52d608c670c5c485cfe1139c40ec06d8ef460a26.tar.gz
UXP-52d608c670c5c485cfe1139c40ec06d8ef460a26.tar.lz
UXP-52d608c670c5c485cfe1139c40ec06d8ef460a26.tar.xz
UXP-52d608c670c5c485cfe1139c40ec06d8ef460a26.zip
Merge pull request #599 from janekptacijarabaci/dom_fetch_request_navigate_1
Added support for Request constructor with "mode: navigate"
Diffstat (limited to 'dom/tests/mochitest/fetch/test_request.js')
-rw-r--r--dom/tests/mochitest/fetch/test_request.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/dom/tests/mochitest/fetch/test_request.js b/dom/tests/mochitest/fetch/test_request.js
index 5be361a46..405767b50 100644
--- a/dom/tests/mochitest/fetch/test_request.js
+++ b/dom/tests/mochitest/fetch/test_request.js
@@ -152,12 +152,9 @@ function testHeaderGuard() {
}
function testMode() {
- try {
- var req = new Request("http://example.com", {mode: "navigate"});
- ok(false, "Creating a Request with navigate RequestMode should throw a TypeError");
- } catch(e) {
- is(e.name, "TypeError", "Creating a Request with navigate RequestMode should throw a TypeError");
- }
+ var req = new Request("http://example.com", {mode: "navigate"});
+ ok(true, "Creating a Request with navigate RequestMode should not throw.");
+ is(req.mode, "same-origin", "Request mode becomes same-origin");
}
function testMethod() {