mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1592699 - Fix test_serviceworker_lifetime.html r=asuth
- Reset idle timeout when dispatching service worker operations even if the worker is alive. - Use MessageEvent instead of FetchEvent to avoid creating objects that leak when the test finishes. Differential Revision: https://phabricator.services.mozilla.com/D51016 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
5b7ceaf11d
commit
8ae16063a4
@ -26,7 +26,6 @@ skip-if = os == "win" # Bug 1373346
|
||||
[test_try_registering_offline_disabled.html]
|
||||
skip-if = os == "win" # Bug 1373346
|
||||
[test_serviceworker_lifetime.html]
|
||||
fail-if = fission
|
||||
skip-if = serviceworker_e10s || !e10s || os == "win" || os =="linux" && bits == 64 || os =="mac" # e10s: Bug 1433689, Windows: Bug 1373346, Bug 1578333, Bug 1578374
|
||||
[test_error_reporting.html]
|
||||
skip-if = serviceworker_e10s
|
||||
|
@ -327,11 +327,11 @@
|
||||
["dom.serviceWorkers.idle_extended_timeout", 0],
|
||||
],
|
||||
steps(context) {
|
||||
return new Promise(function(res, rej) {
|
||||
context.iframe.contentWindow.fetch("update");
|
||||
res(context);
|
||||
});
|
||||
},
|
||||
return new Promise(function(res, rej) {
|
||||
context.iframe.contentWindow.navigator.serviceWorker.controller.postMessage("ping");
|
||||
res(context);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
// Test that service worker is closed when the extended timeout expired
|
||||
|
@ -230,6 +230,7 @@ nsresult ServiceWorkerPrivateImpl::SpawnWorkerIfNeeded() {
|
||||
MOZ_ASSERT(mOuter->mInfo);
|
||||
|
||||
if (mControllerChild) {
|
||||
mOuter->RenewKeepAliveToken(ServiceWorkerPrivate::WakeUpReason::Unknown);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user