<!-- AnycopyrightisdedicatedtothePublicDomain. http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPEHTML>
<html>
<head>
<title>Bug 1151916 - Test principal is set on cached serviceworkers</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <!-- Iftheprincipalisnotset,accessingself.cachesintheworkerwillcrash.
-->
</head>
<body>
<p id="display"></p>
<div id="content"></div>
<pre id="test"></pre>
<script class="testbody" type="text/javascript">
varframe;
function listenForMessage() { var p = new Promise(function(resolve, reject) {
window.onmessage = function(e) {
if (e.data.status == "failed") {
ok(false, "iframe had error " + e.data.message);
reject(e.data.message);
} else if (e.data.status == "success") {
ok(true, "iframe step success " + e.data.message);
resolve(e.data.message);
} else {
ok(false, "Unexpected message " + e.data);
reject();
}
}
});
return p;
}
// We have the iframe register for its own scope so that this page is not
// holding any references when we GC.
function register() { var p = listenForMessage();
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.