Bug 1440022: disconnect push tests from actually running r=lina

These tests were only not connecting due to an implementation detail
of the Push component.

MozReview-Commit-ID: 49JPgsfRxTF

--HG--
extra : rebase_source : 10a9116cbd4ecfbd8071b856bfafa59fe6dcdffc
This commit is contained in:
Ethan Glasser-Camp 2018-06-13 20:46:17 -04:00
parent 4696947f19
commit a0486a80d1
4 changed files with 7 additions and 2 deletions

View File

@ -19,8 +19,6 @@ const PushService = Cc["@mozilla.org/push/Service;1"]
add_task(async function() {
info("Turn on workers via mochitest http.");
await enableServiceWorkerDebugging();
// Enable the push service.
await pushPref("dom.push.connection.enabled", true);
info("Mock the push service");
PushService.service = {

View File

@ -4,6 +4,7 @@ const pushNotifier = Cc['@mozilla.org/push/Notifier;1']
.getService(Ci.nsIPushNotifier);
add_task(async function test_observer_remoting() {
do_get_profile();
if (isParent) {
await testInParent();
} else {
@ -22,6 +23,7 @@ const parentTests = [{
}];
async function testInParent() {
setPrefs();
// Register observers for notifications from the child, then run the test in
// the child and wait for the notifications.
let promiseNotifications = childTests.reduce(

View File

@ -7,6 +7,7 @@ const {PushDB, PushService, PushServiceWebSocket} = serviceExports;
function run_test() {
do_get_profile();
setPrefs();
run_next_test();
}

View File

@ -124,6 +124,10 @@ try {
}
} catch (e) { }
if (runningInParent) {
_Services.prefs.setBoolPref("dom.push.connection.enabled", false);
}
// Configure a console listener so messages sent to it are logged as part
// of the test.
try {