Closed Bug 1164304 Opened 8 years ago Closed 8 years ago

Run all fetch tests in the service worker context as well

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

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

Details

Attachments

(1 file)

This brings this mini test suite on par with the one that we
have been using for DOM Cache.
Comment on attachment 8604982 [details] [diff] [review]
Run all fetch tests in the service worker context as well

Review of attachment 8604982 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/tests/mochitest/fetch/fetch_test_framework.js
@@ +5,5 @@
> +        "set": [["dom.serviceWorkers.enabled", true],
> +                ["dom.serviceWorkers.testing.enabled", true],
> +                ["dom.serviceWorkers.exemptFromPerDomainMax", true]]
> +      }, function() {
> +        resolve();

Nit: function() { resolve(); }  ----> resolve

@@ +41,5 @@
> +      return Promise.resolve();
> +    }
> +    return new Promise(function(resolve, reject) {
> +      function setupSW(registration) {
> +        var worker = registration.waiting ||

ready() is only triggered once there is active
Attachment #8604982 - Flags: review?(nsm.nikhil) → review+
(In reply to Nikhil Marathe [:nsm] (needinfo? please) from comment #2)
> @@ +41,5 @@
> > +      return Promise.resolve();
> > +    }
> > +    return new Promise(function(resolve, reject) {
> > +      function setupSW(registration) {
> > +        var worker = registration.waiting ||
> 
> ready() is only triggered once there is active

I'll keep this one as is, since bug 1143981 needs it...
https://hg.mozilla.org/mozilla-central/rev/02c55409bb06
Assignee: nobody → ehsan
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.