var controlledFrame;
add_task(async function createControlledIFrame() {
controlledFrame = await injectControlledFrame();
});
var idCounter = 1;
function waitForDeliveryError(request) {
return new Promise(resolve => { var data = new TextEncoder().encode(JSON.stringify(request)); var principal = SpecialPowers.wrap(window).clientPrincipal;
add_task(async function reportDecryptionError() { var message = await new Promise(resolve => {
SpecialPowers.registerConsoleListener(msg => {
if (!msg.isScriptError && !msg.isConsoleEvent) {
return;
}
const scope = "http://mochi.test:8888/tests/dom/push/test/";
if (msg.innerWindowID === "ServiceWorker" &&
msg.windowID === scope) {
SpecialPowers.postConsoleSentinel();
resolve(msg);
}
});
var principal = SpecialPowers.wrap(window).clientPrincipal;
pushNotifier.notifyError(registration.scope, principal, "Push error",
SpecialPowers.Ci.nsIScriptError.errorFlag);
});
is(message.sourceName, registration.scope, "Should use the qualified scope URL as the source");
is(message.errorMessage, "Push error", "Should report the given error string");
});
add_task(async function unsubscribe() {
controlledFrame.remove();
});
add_task(async function unregister() {
await registration.unregister();
});
</script>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.24 Sekunden
(vorverarbeitet)
¤
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.