зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset d90e308bfb98 (bug 1159813) for "test_importscript.html | Unregister should return true" failures
CLOSED TREE
This commit is contained in:
Родитель
103c1aa5e2
Коммит
fee82dca85
|
@ -1,7 +1,5 @@
|
|||
function handleRequest(request, response) {
|
||||
if (request.queryString == 'clearcounter') {
|
||||
setState('counter', '');
|
||||
} else if (!getState('counter')) {
|
||||
if (!getState('counter')) {
|
||||
response.setHeader("Content-Type", "application/javascript", false);
|
||||
response.write("callByScript();");
|
||||
setState('counter', '1');
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
function handleRequest(request, response) {
|
||||
if (request.queryString == 'clearcounter') {
|
||||
setState('periodiccounter', '');
|
||||
return;
|
||||
}
|
||||
if (!getState('periodiccounter')) {
|
||||
setState('periodiccounter', '1');
|
||||
} else {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
fetch("../periodic.sjs?clearcounter").then(function() {
|
||||
return navigator.serviceWorker.getRegistration(".");
|
||||
}).then(function(registration) {
|
||||
navigator.serviceWorker.getRegistration(".").then(function(registration) {
|
||||
registration.unregister().then(function(success) {
|
||||
if (success) {
|
||||
parent.callback();
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
}
|
||||
|
||||
function unregister() {
|
||||
fetch("importscript.sjs?clearcounter").then(function() {
|
||||
return registration.unregister();
|
||||
}).then(function(result) {
|
||||
return registration.unregister().then(function(result) {
|
||||
ok(result, "Unregister should return true.");
|
||||
}, function(e) {
|
||||
dump("Unregistering the SW failed with " + e + "\n");
|
||||
|
|
Загрузка…
Ссылка в новой задаче