Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Issue 1812503002: Fix race in ServiceWorkerBackgroundSyncTest.Sync (Closed)

Created:
4 years, 9 months ago by jkarlin
Modified:
4 years, 9 months ago
Reviewers:
lazyboy, iclelland
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, plaree+watch_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race in ServiceWorkerBackgroundSyncTest.Sync It's possible for the sync event to be dispatched in the test before the postMessage is received by the ServiceWorker. This CL fixes that by waiting for a response from the postMessage before starting the sync event. BUG=595191 Committed: https://crrev.com/37d4fa339120b2d98b41b4fc037d11131c12aac4 Cr-Commit-Position: refs/heads/master@{#381499}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Verify messages #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -1 line) Patch
M chrome/test/data/extensions/api_test/service_worker/sync/page.js View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/service_worker/sync/sw.js View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
jkarlin
PTAL, thanks!
4 years, 9 months ago (2016-03-16 15:33:11 UTC) #2
iclelland
https://codereview.chromium.org/1812503002/diff/1/chrome/test/data/extensions/api_test/service_worker/sync/sw.js File chrome/test/data/extensions/api_test/service_worker/sync/sw.js (right): https://codereview.chromium.org/1812503002/diff/1/chrome/test/data/extensions/api_test/service_worker/sync/sw.js#newcode24 chrome/test/data/extensions/api_test/service_worker/sync/sw.js:24: port.postMessage('connected'); Should this check to see if e.data is ...
4 years, 9 months ago (2016-03-16 15:46:33 UTC) #3
jkarlin
Thanks, PTAL https://codereview.chromium.org/1812503002/diff/1/chrome/test/data/extensions/api_test/service_worker/sync/sw.js File chrome/test/data/extensions/api_test/service_worker/sync/sw.js (right): https://codereview.chromium.org/1812503002/diff/1/chrome/test/data/extensions/api_test/service_worker/sync/sw.js#newcode24 chrome/test/data/extensions/api_test/service_worker/sync/sw.js:24: port.postMessage('connected'); On 2016/03/16 15:46:33, iclelland wrote: > ...
4 years, 9 months ago (2016-03-16 16:59:37 UTC) #4
iclelland
lgtm
4 years, 9 months ago (2016-03-16 17:46:09 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1812503002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1812503002/20001
4 years, 9 months ago (2016-03-16 17:47:00 UTC) #7
lazyboy
lgtm, thank you!
4 years, 9 months ago (2016-03-16 17:55:34 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-16 18:17:04 UTC) #9
commit-bot: I haz the power
4 years, 9 months ago (2016-03-16 18:19:21 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/37d4fa339120b2d98b41b4fc037d11131c12aac4
Cr-Commit-Position: refs/heads/master@{#381499}

Powered by Google App Engine
This is Rietveld 408576698