diff --git a/service-workers/service-worker/clients-matchall-frozen.https.html b/service-workers/service-worker/clients-matchall-frozen.https.html new file mode 100644 index 00000000000000..ef27ac3d372e5d --- /dev/null +++ b/service-workers/service-worker/clients-matchall-frozen.https.html @@ -0,0 +1,103 @@ + +Service Worker: Clients.matchAll + + + + diff --git a/service-workers/service-worker/resources/clients-frame-freeze.html b/service-workers/service-worker/resources/clients-frame-freeze.html new file mode 100644 index 00000000000000..7468a660e90858 --- /dev/null +++ b/service-workers/service-worker/resources/clients-frame-freeze.html @@ -0,0 +1,15 @@ + + + + diff --git a/service-workers/service-worker/resources/clients-matchall-worker.js b/service-workers/service-worker/resources/clients-matchall-worker.js index d6634f4d40ef6a..13e111a2f91464 100644 --- a/service-workers/service-worker/resources/clients-matchall-worker.js +++ b/service-workers/service-worker/resources/clients-matchall-worker.js @@ -13,11 +13,20 @@ self.onmessage = function(e) { // In that case, just pretend it's top-level! frame_type = 'top-level'; } - message.push([client.visibilityState, - client.focused, - client.url, - client.type, - frame_type]); + if (e.data.includeLifecycleState) { + message.push({visibilityState: client.visibilityState, + focused: client.focused, + url: client.url, + lifecycleState: client.lifecycleState, + type: client.type, + frameType: frame_type}); + } else { + message.push([client.visibilityState, + client.focused, + client.url, + client.type, + frame_type]); + } }); // Sort by url if (!e.data.disableSort) {