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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → ehsan
Blocks: 1121157
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+
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: