summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-05 13:08:32 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-05 13:08:32 +0200
commitbfeac5c28ddb60531f25d7d99d0299a5161b9a8e (patch)
tree6d8516615e60a04243a976f2b1a76e16e8e845ea /dom/tests/mochitest
parenta80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca (diff)
downloadUXP-bfeac5c28ddb60531f25d7d99d0299a5161b9a8e.tar
UXP-bfeac5c28ddb60531f25d7d99d0299a5161b9a8e.tar.gz
UXP-bfeac5c28ddb60531f25d7d99d0299a5161b9a8e.tar.lz
UXP-bfeac5c28ddb60531f25d7d99d0299a5161b9a8e.tar.xz
UXP-bfeac5c28ddb60531f25d7d99d0299a5161b9a8e.zip
Bug 1298823 - Fix Request constructor - with "mode: navigate"
Diffstat (limited to 'dom/tests/mochitest')
-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() {