summaryrefslogtreecommitdiffstats
path: root/dom/workers
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/workers
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/workers')
-rw-r--r--dom/workers/test/serviceworkers/fetch_event_worker.js23
1 files changed, 8 insertions, 15 deletions
diff --git a/dom/workers/test/serviceworkers/fetch_event_worker.js b/dom/workers/test/serviceworkers/fetch_event_worker.js
index 1caef71e8..895128e2c 100644
--- a/dom/workers/test/serviceworkers/fetch_event_worker.js
+++ b/dom/workers/test/serviceworkers/fetch_event_worker.js
@@ -148,28 +148,21 @@ onfetch = function(ev) {
}
else if (ev.request.url.includes("navigate.html")) {
- var navigateModeCorrectlyChecked = false;
var requests = [ // should not throw
new Request(ev.request),
new Request(ev.request, undefined),
new Request(ev.request, null),
new Request(ev.request, {}),
new Request(ev.request, {someUnrelatedProperty: 42}),
+ new Request(ev.request, {method: "GET"}),
];
- try {
- var request3 = new Request(ev.request, {method: "GET"}); // should throw
- } catch(e) {
- navigateModeCorrectlyChecked = requests[0].mode == "navigate";
- }
- if (navigateModeCorrectlyChecked) {
- ev.respondWith(Promise.resolve(
- new Response("<script>window.frameElement.test_result = true;</script>", {
- headers : {
- "Content-Type": "text/html"
- }
- })
- ));
- }
+ ev.respondWith(Promise.resolve(
+ new Response("<script>window.frameElement.test_result = true;</script>", {
+ headers : {
+ "Content-Type": "text/html"
+ }
+ })
+ ));
}
else if (ev.request.url.includes("nonexistent_worker_script.js")) {