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

Issue 2504663002: Added a local tick clock to ServiceWorkerVersion. (Closed)

Created:
4 years, 1 month ago by harkness
Modified:
4 years ago
CC:
blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+serviceworker, michaeln, nhiroki, serviceworker-reviews, shimazu+serviceworker_chromium.org, tzik
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added a local tick clock to ServiceWorkerVersion. As part of testing for functionality that uses StartRequestWithCustomTimout, a way to trigger the timeout was needed on ServiceWorkerVersion. This CL adds a clock that can be overridden by testing. It also updates the ServiceWorker version tests to test multiple entries in the timeout request queue and that they time out in the correct order. BUG=649403 Committed: https://crrev.com/641c3b9629668ad19be1ee9ba8936624ce364bfa Cr-Commit-Position: refs/heads/master@{#435929}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Code review comments #

Patch Set 3 : Code review comments #

Patch Set 4 : Fix test issues and rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -29 lines) Patch
M content/browser/service_worker/service_worker_version.h View 1 2 3 5 chunks +15 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 13 chunks +34 lines, -25 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 5 chunks +71 lines, -2 lines 0 comments Download

Messages

Total messages: 34 (21 generated)
harkness
https://codereview.chromium.org/2504663002/diff/1/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/2504663002/diff/1/content/browser/service_worker/service_worker_version.cc#newcode1161 content/browser/service_worker/service_worker_version.cc:1161: int64_t callback_id = tick_clock_->NowTicks().ToInternalValue(); If tick_clock_ is overridden by ...
4 years, 1 month ago (2016-11-15 16:53:42 UTC) #2
harkness
Hi falken@, I wrote this patch because we were trying to test code that uses ...
4 years ago (2016-11-29 17:27:07 UTC) #8
falken
Sorry I didn't get to this today and am ooo tomorrow. Will review as soon ...
4 years ago (2016-11-30 11:59:43 UTC) #9
chromium-reviews
Thanks for taking a look, there's no rush for it. On Wed, Nov 30, 2016 ...
4 years ago (2016-11-30 12:39:40 UTC) #10
Marijn Kruisselbrink
FWIW I'm actually using this in some tests for timeout behavior for message and foreignfetch ...
4 years ago (2016-12-02 00:15:52 UTC) #15
falken
Thanks for the patch, this looks useful. lgtm https://codereview.chromium.org/2504663002/diff/1/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/2504663002/diff/1/content/browser/service_worker/service_worker_version.h#newcode594 content/browser/service_worker/service_worker_version.h:594: // ...
4 years ago (2016-12-02 09:12:28 UTC) #16
harkness
https://codereview.chromium.org/2504663002/diff/1/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/2504663002/diff/1/content/browser/service_worker/service_worker_version.h#newcode594 content/browser/service_worker/service_worker_version.h:594: // The following methods all rely on the internal ...
4 years ago (2016-12-02 10:15:33 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2504663002/40001
4 years ago (2016-12-02 10:16:11 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/271171)
4 years ago (2016-12-02 10:49:58 UTC) #22
harkness
Proof that I should not upload patches before morning caffeine.
4 years ago (2016-12-02 11:23:01 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2504663002/60001
4 years ago (2016-12-02 13:28:57 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-02 13:32:57 UTC) #32
commit-bot: I haz the power
4 years ago (2016-12-02 13:35:40 UTC) #34
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/641c3b9629668ad19be1ee9ba8936624ce364bfa
Cr-Commit-Position: refs/heads/master@{#435929}

Powered by Google App Engine
This is Rietveld 408576698