Add a way to replace the entire Push service in tests

RESOLVED FIXED in Firefox 48

Status

()

Core
DOM: Push Notifications
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: kitcambridge, Assigned: kitcambridge)

Tracking

unspecified
mozilla48
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

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

Review commit: https://reviewboard.mozilla.org/r/41839/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/41839/
Attachment #8733617 - Flags: review?(wchen)
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/

Updated

2 years ago
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.

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/2c90f268c62b
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.