Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 8561e52

Browse files
Yang-33chromium-wpt-export-bot
authored andcommitted
Service worker: Add self.serviceWorker to ServiceWorkerGlobalScope
- In the previous code, the expiration time was set to null so that remaining_timeout() was negative during initial script evaluation so that calling self.serviceWorker.postMessage() would fail. This CL sets max_request_expiration_time properly in ServiceWorkerVersion::StartWorkerInternal(). - Add and fix unittests about expiration time. - Fix the expected.txt properly. - In spec, service worker's initial state should be parsed. https://w3c.github.io/ServiceWorker/#service-worker-concept Link to the Chrome Platform Status: https://chromestatus.com/feature/6678900060979200 Bug: 977496 Change-Id: I4f8368e165fb84304b49519ed43d7b21d5ec756d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819091 Reviewed-by: Kinuko Yasuda <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Reviewed-by: Matt Falkenhagen <[email protected]> Reviewed-by: Makoto Shimazu <[email protected]> Commit-Queue: Yuta Kasai <[email protected]> Cr-Commit-Position: refs/heads/master@{#702788}
1 parent 42efecf commit 8561e52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service-workers/service-worker/global-serviceworker.https.any.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async_test((t) => {
1717
assert_true('serviceWorker' in self, 'self.serviceWorker exists');
1818
serviceWorker.postMessage({ messageTest: true });
1919

20-
// The rest of the rest runs once we receive the above message.
20+
// The rest of the test runs once this receives the above message.
2121
addEventListener('message', t.step_func((event) => {
2222
// Ignore unrelated messages.
2323
if (!event.data.messageTest) return;

0 commit comments

Comments
 (0)