Closed
Bug 1147367
Opened 9 years ago
Closed 9 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•9 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•9 years ago
|
||
Done! https://hg.mozilla.org/integration/mozilla-inbound/rev/568da0ccb3ad
Comment 4•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/568da0ccb3ad
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•