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

Issue 1445603003: Extension SW - add test for ServiceWorkerRegistration.sync. (Closed)

Created:
5 years, 1 month ago by lazyboy
Modified:
5 years, 1 month ago
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, jam, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, jkarlin+watch_chromium.org, darin-cc_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

Extension SW - add test for ServiceWorkerRegistration.sync. The test puts the sync manager to offline and mode and then requests a sync through ServiceWorker. The ServiceWorker's onsync method fires when we put the sync manager back to online mode. BUG=545535 Committed: https://crrev.com/bd325ae36bddc7d929a3562a44c5061d7015841b Cr-Commit-Position: refs/heads/master@{#360417}

Patch Set 1 #

Patch Set 2 : some minor cleanup #

Total comments: 2

Patch Set 3 : more foo #

Total comments: 17

Patch Set 4 : sync + address comments #

Patch Set 5 : fix after r360068 #

Total comments: 19

Patch Set 6 : address comment from devlin+jkarlin #

Total comments: 2

Patch Set 7 : move background_sync_test_util to content namespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -55 lines) Patch
M chrome/browser/extensions/service_worker_apitest.cc View 1 2 3 4 5 6 3 chunks +49 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/service_worker/sync/manifest.json View 1 chunk +6 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/service_worker/sync/page.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/service_worker/sync/page.js View 1 2 3 4 5 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/service_worker/sync/sw.js View 1 2 3 4 5 1 chunk +24 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_browsertest.cc View 1 2 3 4 18 chunks +21 lines, -50 lines 0 comments Download
M content/browser/background_sync/background_sync_manager_unittest.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/background_sync/background_sync_service_impl_unittest.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A content/public/test/background_sync_test_util.h View 1 2 3 4 5 6 1 chunk +30 lines, -0 lines 0 comments Download
A content/public/test/background_sync_test_util.cc View 1 2 3 4 5 6 1 chunk +66 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (6 generated)
lazyboy
https://chromiumcodereview.appspot.com/1445603003/diff/20001/chrome/test/data/extensions/api_test/service_worker/sync/page.js File chrome/test/data/extensions/api_test/service_worker/sync/page.js (right): https://chromiumcodereview.appspot.com/1445603003/diff/20001/chrome/test/data/extensions/api_test/service_worker/sync/page.js#newcode18 chrome/test/data/extensions/api_test/service_worker/sync/page.js:18: if (syncPermissionState != 'granted') { I'm not sure why ...
5 years, 1 month ago (2015-11-14 00:08:23 UTC) #2
Devlin
https://chromiumcodereview.appspot.com/1445603003/diff/20001/chrome/test/data/extensions/api_test/service_worker/sync/page.js File chrome/test/data/extensions/api_test/service_worker/sync/page.js (right): https://chromiumcodereview.appspot.com/1445603003/diff/20001/chrome/test/data/extensions/api_test/service_worker/sync/page.js#newcode18 chrome/test/data/extensions/api_test/service_worker/sync/page.js:18: if (syncPermissionState != 'granted') { On 2015/11/14 00:08:23, lazyboy ...
5 years, 1 month ago (2015-11-16 18:12:41 UTC) #3
jkarlin
Note that a much simplified API is about to land for background sync and will ...
5 years, 1 month ago (2015-11-16 18:33:27 UTC) #5
lazyboy
@jkarlin, thanks for the heads up. I'll wait until https://codereview.chromium.org/1437883002/ lands and update the CL. ...
5 years, 1 month ago (2015-11-16 19:30:16 UTC) #6
jkarlin
On 2015/11/16 19:30:16, lazyboy wrote: > @jkarlin, thanks for the heads up. I'll wait until ...
5 years, 1 month ago (2015-11-16 19:37:26 UTC) #7
jkarlin
On 2015/11/16 19:37:26, jkarlin wrote: > On 2015/11/16 19:30:16, lazyboy wrote: > > @jkarlin, thanks ...
5 years, 1 month ago (2015-11-17 14:02:07 UTC) #8
lazyboy
On 2015/11/17 14:02:07, jkarlin wrote: > On 2015/11/16 19:37:26, jkarlin wrote: > > On 2015/11/16 ...
5 years, 1 month ago (2015-11-17 18:55:12 UTC) #9
Devlin
lgtm https://chromiumcodereview.appspot.com/1445603003/diff/40001/content/public/test/background_sync_test_util.h File content/public/test/background_sync_test_util.h (right): https://chromiumcodereview.appspot.com/1445603003/diff/40001/content/public/test/background_sync_test_util.h#newcode13 content/public/test/background_sync_test_util.h:13: class BackgroundSyncTestUtil { On 2015/11/16 19:30:16, lazyboy wrote: ...
5 years, 1 month ago (2015-11-17 19:21:17 UTC) #10
jkarlin
https://chromiumcodereview.appspot.com/1445603003/diff/80001/chrome/test/data/extensions/api_test/service_worker/sync/page.js File chrome/test/data/extensions/api_test/service_worker/sync/page.js (right): https://chromiumcodereview.appspot.com/1445603003/diff/80001/chrome/test/data/extensions/api_test/service_worker/sync/page.js#newcode7 chrome/test/data/extensions/api_test/service_worker/sync/page.js:7: var startServiceWorker = new Promise(function(resolve, reject) { Perhaps rename ...
5 years, 1 month ago (2015-11-17 20:36:15 UTC) #11
lazyboy
https://chromiumcodereview.appspot.com/1445603003/diff/80001/chrome/browser/extensions/service_worker_apitest.cc File chrome/browser/extensions/service_worker_apitest.cc (right): https://chromiumcodereview.appspot.com/1445603003/diff/80001/chrome/browser/extensions/service_worker_apitest.cc#newcode384 chrome/browser/extensions/service_worker_apitest.cc:384: ExtensionTestMessageListener sync_listener("SYNC: send-chats", false); On 2015/11/17 19:21:17, Devlin wrote: ...
5 years, 1 month ago (2015-11-17 21:41:28 UTC) #12
Devlin
https://chromiumcodereview.appspot.com/1445603003/diff/80001/chrome/browser/extensions/service_worker_apitest.cc File chrome/browser/extensions/service_worker_apitest.cc (right): https://chromiumcodereview.appspot.com/1445603003/diff/80001/chrome/browser/extensions/service_worker_apitest.cc#newcode384 chrome/browser/extensions/service_worker_apitest.cc:384: ExtensionTestMessageListener sync_listener("SYNC: send-chats", false); On 2015/11/17 21:41:28, lazyboy wrote: ...
5 years, 1 month ago (2015-11-17 21:43:06 UTC) #13
jkarlin
lgtm
5 years, 1 month ago (2015-11-18 15:07:43 UTC) #14
lazyboy
+Avi for content/public/test/*
5 years, 1 month ago (2015-11-18 18:25:46 UTC) #16
Avi (use Gerrit)
https://codereview.chromium.org/1445603003/diff/100001/content/public/test/background_sync_test_util.h File content/public/test/background_sync_test_util.h (right): https://codereview.chromium.org/1445603003/diff/100001/content/public/test/background_sync_test_util.h#newcode10 content/public/test/background_sync_test_util.h:10: } // namespace content Why is this whole file ...
5 years, 1 month ago (2015-11-18 18:57:26 UTC) #17
lazyboy
https://codereview.chromium.org/1445603003/diff/100001/content/public/test/background_sync_test_util.h File content/public/test/background_sync_test_util.h (right): https://codereview.chromium.org/1445603003/diff/100001/content/public/test/background_sync_test_util.h#newcode10 content/public/test/background_sync_test_util.h:10: } // namespace content On 2015/11/18 18:57:26, Avi wrote: ...
5 years, 1 month ago (2015-11-18 19:35:44 UTC) #19
Avi (use Gerrit)
lgtm
5 years, 1 month ago (2015-11-18 19:37:47 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1445603003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1445603003/140001
5 years, 1 month ago (2015-11-18 21:10:15 UTC) #23
commit-bot: I haz the power
Committed patchset #7 (id:140001)
5 years, 1 month ago (2015-11-18 21:35:37 UTC) #24
commit-bot: I haz the power
5 years, 1 month ago (2015-11-18 21:36:40 UTC) #25
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/bd325ae36bddc7d929a3562a44c5061d7015841b
Cr-Commit-Position: refs/heads/master@{#360417}

Powered by Google App Engine
This is Rietveld 408576698