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

Issue 1432823003: Add a test to cover service worker update codepath when extension is updated (Closed)

Created:
5 years, 1 month ago by lazyboy
Modified:
5 years ago
Reviewers:
falken, Devlin
CC:
chromium-reviews, michaeln, extensions-reviews_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, chromium-apps-reviews_chromium.org, kinuko+watch, jsbell+serviceworker_chromium.org, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a test to cover service worker update codepath when extension is updated. The updated extension's service worker calls skipWaiting() on its oninstall handler to let the new service worker control its clients right away. BUG=533065 Committed: https://crrev.com/c3e763a2164e421055b2a01d5b21426a9abca83a Cr-Commit-Position: refs/heads/master@{#364195}

Patch Set 1 #

Patch Set 2 : add missing files #

Patch Set 3 : test updated #

Total comments: 4

Patch Set 4 : use set_force_update_on_page_load() + git cl format #

Total comments: 12

Patch Set 5 : address comments + git cl format #

Total comments: 2

Patch Set 6 : use swglobalctx.oninstall + onactivate to replace active worker in test == no code change! #

Patch Set 7 : remove clients.claim #

Total comments: 10

Patch Set 8 : remove SW.register() from v2 extension #

Patch Set 9 : remove SW.register() from v2 extension #

Messages

Total messages: 31 (11 generated)
lazyboy
Question below: https://chromiumcodereview.appspot.com/1432823003/diff/40001/extensions/browser/service_worker_manager.cc File extensions/browser/service_worker_manager.cc (right): https://chromiumcodereview.appspot.com/1432823003/diff/40001/extensions/browser/service_worker_manager.cc#newcode58 extensions/browser/service_worker_manager.cc:58: // TODO(lazyboy): This is racy because this ...
5 years, 1 month ago (2015-11-10 00:45:44 UTC) #4
Devlin
https://chromiumcodereview.appspot.com/1432823003/diff/40001/extensions/browser/service_worker_manager.cc File extensions/browser/service_worker_manager.cc (right): https://chromiumcodereview.appspot.com/1432823003/diff/40001/extensions/browser/service_worker_manager.cc#newcode58 extensions/browser/service_worker_manager.cc:58: // TODO(lazyboy): This is racy because this relies on ...
5 years, 1 month ago (2015-11-10 16:59:50 UTC) #5
lazyboy
https://chromiumcodereview.appspot.com/1432823003/diff/40001/extensions/browser/service_worker_manager.cc File extensions/browser/service_worker_manager.cc (right): https://chromiumcodereview.appspot.com/1432823003/diff/40001/extensions/browser/service_worker_manager.cc#newcode63 extensions/browser/service_worker_manager.cc:63: ->DeleteForOrigin(extension->url(), base::Bind(&EmptySuccessCallback)); On 2015/11/10 16:59:50, Devlin wrote: > (Sorry ...
5 years, 1 month ago (2015-11-11 00:56:27 UTC) #6
Devlin
LGTM with a few small nits. falken@ has been handling a lot of the service ...
5 years, 1 month ago (2015-11-11 17:10:29 UTC) #8
lazyboy
+falken for ServiceWorker changes. https://chromiumcodereview.appspot.com/1432823003/diff/60001/chrome/browser/extensions/service_worker_apitest.cc File chrome/browser/extensions/service_worker_apitest.cc (right): https://chromiumcodereview.appspot.com/1432823003/diff/60001/chrome/browser/extensions/service_worker_apitest.cc#newcode152 chrome/browser/extensions/service_worker_apitest.cc:152: ExtensionService* service = On 2015/11/11 ...
5 years, 1 month ago (2015-11-11 22:32:24 UTC) #11
lazyboy
(missed hitting "Done" for some comments) https://chromiumcodereview.appspot.com/1432823003/diff/60001/content/public/browser/service_worker_context.h File content/public/browser/service_worker_context.h (right): https://chromiumcodereview.appspot.com/1432823003/diff/60001/content/public/browser/service_worker_context.h#newcode72 content/public/browser/service_worker_context.h:72: virtual void SetForceUpdateOnPageLoadForOrigin(const ...
5 years, 1 month ago (2015-11-11 22:34:03 UTC) #12
falken
Sorry I'm just getting back from traveling. Will take a look as soon as possible ...
5 years, 1 month ago (2015-11-16 09:33:54 UTC) #13
falken
https://codereview.chromium.org/1432823003/diff/80001/content/browser/service_worker/service_worker_context_wrapper.cc File content/browser/service_worker/service_worker_context_wrapper.cc (right): https://codereview.chromium.org/1432823003/diff/80001/content/browser/service_worker/service_worker_context_wrapper.cc#newcode339 content/browser/service_worker/service_worker_context_wrapper.cc:339: registration->set_force_update_on_page_load(true); This is a hacky bit used for the ...
5 years, 1 month ago (2015-11-17 02:10:23 UTC) #14
Devlin
https://codereview.chromium.org/1432823003/diff/80001/content/browser/service_worker/service_worker_context_wrapper.cc File content/browser/service_worker/service_worker_context_wrapper.cc (right): https://codereview.chromium.org/1432823003/diff/80001/content/browser/service_worker/service_worker_context_wrapper.cc#newcode339 content/browser/service_worker/service_worker_context_wrapper.cc:339: registration->set_force_update_on_page_load(true); On 2015/11/17 02:10:22, falken (maybe slow) wrote: > ...
5 years, 1 month ago (2015-11-17 19:23:56 UTC) #15
falken
On 2015/11/17 19:23:56, Devlin wrote: > https://codereview.chromium.org/1432823003/diff/80001/content/browser/service_worker/service_worker_context_wrapper.cc > File content/browser/service_worker/service_worker_context_wrapper.cc (right): > > https://codereview.chromium.org/1432823003/diff/80001/content/browser/service_worker/service_worker_context_wrapper.cc#newcode339 > ...
5 years, 1 month ago (2015-11-18 01:48:06 UTC) #16
lazyboy
On 2015/11/18 01:48:06, falken wrote: > On 2015/11/17 19:23:56, Devlin wrote: > > > https://codereview.chromium.org/1432823003/diff/80001/content/browser/service_worker/service_worker_context_wrapper.cc ...
5 years, 1 month ago (2015-11-20 00:40:57 UTC) #17
falken
Awesome if it's working as is! I'd recommend confirming the behavior when the developer forgets ...
5 years, 1 month ago (2015-11-20 03:19:47 UTC) #18
lazyboy
FYI, I haven't had a chance to complete testing the scenarios you mention here. I'll ...
5 years ago (2015-11-24 03:20:13 UTC) #19
lazyboy
On 2015/11/20 03:19:47, falken wrote: > Awesome if it's working as is! I'd recommend confirming ...
5 years ago (2015-12-08 18:00:32 UTC) #21
falken
LGTM! > I didn't see any difference in my two tests (this CL and 1510573003) ...
5 years ago (2015-12-09 02:31:41 UTC) #22
Devlin
lgtm https://chromiumcodereview.appspot.com/1432823003/diff/120001/chrome/browser/extensions/service_worker_apitest.cc File chrome/browser/extensions/service_worker_apitest.cc (right): https://chromiumcodereview.appspot.com/1432823003/diff/120001/chrome/browser/extensions/service_worker_apitest.cc#newcode242 chrome/browser/extensions/service_worker_apitest.cc:242: .GetByID(kId) != NULL); On 2015/12/09 02:31:41, falken wrote: ...
5 years ago (2015-12-09 17:09:07 UTC) #23
lazyboy
https://chromiumcodereview.appspot.com/1432823003/diff/120001/chrome/browser/extensions/service_worker_apitest.cc File chrome/browser/extensions/service_worker_apitest.cc (right): https://chromiumcodereview.appspot.com/1432823003/diff/120001/chrome/browser/extensions/service_worker_apitest.cc#newcode242 chrome/browser/extensions/service_worker_apitest.cc:242: .GetByID(kId) != NULL); On 2015/12/09 17:09:07, Devlin wrote: > ...
5 years ago (2015-12-09 18:55:58 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432823003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432823003/160001
5 years ago (2015-12-09 21:41:27 UTC) #27
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years ago (2015-12-09 23:10:07 UTC) #29
commit-bot: I haz the power
5 years ago (2015-12-09 23:10:57 UTC) #31
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/c3e763a2164e421055b2a01d5b21426a9abca83a
Cr-Commit-Position: refs/heads/master@{#364195}

Powered by Google App Engine
This is Rietveld 408576698