From bfeac5c28ddb60531f25d7d99d0299a5161b9a8e Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 5 Jul 2018 13:08:32 +0200 Subject: Bug 1298823 - Fix Request constructor - with "mode: navigate" --- dom/tests/mochitest/fetch/test_request.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'dom/tests') 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() { -- cgit v1.2.3