var systemNotification = getNotificationObject( "system", "{2bc883bf-2809-4432-b0f4-f54e10372764}"
);
var calendarNotification = getNotificationObject( "calendar", "{d8d11299-a58e-429b-9a9a-57c562982fbf}"
);
// Helper to start the NotificationDB function startNotificationDB() {
ChromeUtils.importESModule( "resource://gre/modules/MemoryNotificationDB.sys.mjs"
);
ChromeUtils.importESModule("resource://gre/modules/NotificationDB.sys.mjs");
}
// Helper function to add a listener, send message and treat the reply function addAndSend(msg, reply, callback, payload, runNext = true) {
let handler = {
receiveMessage(message) { if (message.name === reply) {
Services.cpmm.removeMessageListener(reply, handler);
callback(message); if (runNext) {
run_next_test();
}
}
},
};
Services.cpmm.addMessageListener(reply, handler);
Services.cpmm.sendAsyncMessage(msg, payload);
}
// helper fonction, comparing two notifications function compareNotification(notif1, notif2) { // retrieved notification should be the second one sent for (let prop in notif1) { // compare each property Assert.equal(notif1[prop], notif2[prop]);
}
}
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.