Closed
Bug 1147367
Opened 10 years ago
Closed 10 years ago
Add a test for checking the Request.context attribute for FetchEvents generated for fetch()
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8583054 -
Flags: review?(nsm.nikhil)
Comment on attachment 8583054 [details] [diff] [review]
Add a test for checking the Request.context attribute for FetchEvents generated for fetch()
Review of attachment 8583054 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/workers/test/serviceworkers/fetch/context/context_test.js
@@ +2,5 @@
> + if (event.request.url.indexOf("fetch.txt") >= 0) {
> + var body = event.request.context == "fetch" ?
> + "so fetch" : "so unfetch";
> + event.respondWith(new Response(body));
> + }
Could you add a event.respondWith(Promise.reject()); after the if block so that we never make this sw handle other fetches without finding out about it.
Attachment #8583054 -
Flags: review?(nsm.nikhil) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•