Closed Bug 1258883 Opened 4 years ago Closed 4 years ago

Add a way to replace the entire Push service in tests

Categories

(Core :: DOM: Push Notifications, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: Lina, Assigned: Lina)

References

Details

Attachments

(1 file)

This is similar to replacing the backend, but would let us simulate local app server key errors (bug 1247685) and error reporting (bug 1246341).
Comment on attachment 8733617 [details]
MozReview Request: Bug 1258883 - Add a way to replace the entire Push service in tests. r?wchen

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/41839/diff/1-2/
Attachment #8733617 - Flags: review?(wchen) → review+
Comment on attachment 8733617 [details]
MozReview Request: Bug 1258883 - Add a way to replace the entire Push service in tests. r?wchen

https://reviewboard.mozilla.org/r/41839/#review38655

::: dom/push/test/test_utils.js:165
(Diff revision 2)
>        ["dom.serviceWorkers.testing.enabled", true]
>        ]}, resolve);
>    });
>  }
>  
> +function setupPrefsAndReplaceService(mockService) {

The naming is a little confusing now that we can mock two different things. Please add some comments so that it's clear what is getting mocked out by each method. Maybe rename the existing function to  setupPrefsAndMockServer or something similar.
https://hg.mozilla.org/mozilla-central/rev/2c90f268c62b
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.