// Here we test that if an xpcom component is registered with the category // manager for push notifications against a specific scope, that service is // instantiated before the message is delivered.
let pushNotifier = Cc["@mozilla.org/push/Notifier;1"].getService(
Ci.nsIPushNotifier
);
let principal = Services.scriptSecurityManager.getSystemPrincipal();
pushNotifier.notifyPush(scope, principal, "");
// and a subscription change.
pushNotifier.notifySubscriptionChange(scope, principal);
equal(handlerService.observed.length, 2);
equal(handlerService.observed[1].topic, pushService.subscriptionChangeTopic);
equal(handlerService.observed[1].subject, principal);
equal(handlerService.observed[1].data, scope);
// and a subscription modified event.
pushNotifier.notifySubscriptionModified(scope, principal);
equal(handlerService.observed.length, 3);
equal(
handlerService.observed[2].topic,
pushService.subscriptionModifiedTopic
);
equal(handlerService.observed[2].subject, principal);
equal(handlerService.observed[2].data, scope);
run_next_test();
});
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.19Bemerkung:
(vorverarbeitet am 2026-04-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.