зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
4696947f19
Коммит
a0486a80d1
|
@ -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 = {
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -7,6 +7,7 @@ const {PushDB, PushService, PushServiceWebSocket} = serviceExports;
|
|||
|
||||
function run_test() {
|
||||
do_get_profile();
|
||||
setPrefs();
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче