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

Issue 2555333006: Deflake origin trial token validator tests (Closed)

Created:
4 years ago by iclelland
Modified:
3 years, 4 months ago
CC:
blink-worker-reviews_chromium.org, chasej+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, iclelland+watch_chromuim.org, jam, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+serviceworker, michaeln, mlamouri+watch-content_chromium.org, serviceworker-reviews, shimazu+serviceworker_chromium.org, tzik
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Deflake origin trial token validator tests This removes the dependency on the system clock of the origin trial token validator tests. All static functions in the TrialTokenValidator namespace which validate tokens now take a base::Time argument which is used to compare against the tokens provided. BUG=672294 R=chasej@chromium.org,nhiroki@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_n5x_swarming_rel Review-Url: https://codereview.chromium.org/2555333006 Cr-Commit-Position: refs/heads/master@{#491601} Committed: https://chromium.googlesource.com/chromium/src/+/334e05fb8a8035585a25b1ce419425ac64b3889a

Patch Set 1 #

Patch Set 2 : Also fix GetValidTokensFromHeaders #

Patch Set 3 : Add a clock for testing to serviceworkerversion #

Total comments: 5

Patch Set 4 : Switch WrapUnique to MakeUnique #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -105 lines) Patch
M content/browser/service_worker/foreign_fetch_request_handler_unittest.cc View 1 2 3 3 chunks +11 lines, -0 lines 0 comments Download
M content/browser/service_worker/link_header_support.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 chunks +7 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 8 chunks +14 lines, -7 lines 0 comments Download
M content/common/origin_trials/trial_token_validator.h View 1 2 chunks +11 lines, -5 lines 0 comments Download
M content/common/origin_trials/trial_token_validator.cc View 1 2 8 chunks +18 lines, -12 lines 0 comments Download
M content/common/origin_trials/trial_token_validator_unittest.cc View 1 2 6 chunks +40 lines, -78 lines 0 comments Download
M content/renderer/origin_trials/web_trial_token_validator_impl.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (19 generated)
iclelland
+r chasej for Origin Trials +r nhiroki for content/browser Can you PTAL? Thanks! nhiroki, I'm ...
4 years ago (2016-12-09 18:03:36 UTC) #6
Marijn Kruisselbrink
On 2016/12/09 at 18:03:36, iclelland wrote: > nhiroki, I'm not certain that base::Time::Now() is ideal ...
4 years ago (2016-12-09 19:24:07 UTC) #7
nhiroki
+mek@ and horo@ to the reviewer list. They would be more appropriate reviewers for OriginTrial ...
4 years ago (2016-12-12 02:20:51 UTC) #11
horo
This cl itself LGTM. ServiceWorkerVersion::SetClockForTesting() could be a good solution. But I don't have a ...
3 years, 11 months ago (2017-01-05 08:07:58 UTC) #12
Marijn Kruisselbrink
On 2017/01/05 at 08:07:58, horo wrote: > This cl itself LGTM. > > ServiceWorkerVersion::SetClockForTesting() could ...
3 years, 11 months ago (2017-01-05 22:39:53 UTC) #13
iclelland
On 2017/01/05 22:39:53, Marijn Kruisselbrink wrote: > On 2017/01/05 at 08:07:58, horo wrote: > > ...
3 years, 4 months ago (2017-08-02 19:50:55 UTC) #16
Marijn Kruisselbrink
looks reasonable, yes https://codereview.chromium.org/2555333006/diff/40001/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc File content/browser/service_worker/foreign_fetch_request_handler_unittest.cc (right): https://codereview.chromium.org/2555333006/diff/40001/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc#newcode90 content/browser/service_worker/foreign_fetch_request_handler_unittest.cc:90: version_->SetClockForTesting(base::WrapUnique(clock)); why WrapUnique here, and not ...
3 years, 4 months ago (2017-08-02 19:57:25 UTC) #17
iclelland
https://codereview.chromium.org/2555333006/diff/40001/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc File content/browser/service_worker/foreign_fetch_request_handler_unittest.cc (right): https://codereview.chromium.org/2555333006/diff/40001/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc#newcode90 content/browser/service_worker/foreign_fetch_request_handler_unittest.cc:90: version_->SetClockForTesting(base::WrapUnique(clock)); On 2017/08/02 19:57:25, Marijn Kruisselbrink wrote: > why ...
3 years, 4 months ago (2017-08-02 20:22:05 UTC) #20
Marijn Kruisselbrink
lgtm https://codereview.chromium.org/2555333006/diff/40001/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc File content/browser/service_worker/foreign_fetch_request_handler_unittest.cc (right): https://codereview.chromium.org/2555333006/diff/40001/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc#newcode90 content/browser/service_worker/foreign_fetch_request_handler_unittest.cc:90: version_->SetClockForTesting(base::WrapUnique(clock)); On 2017/08/02 at 20:22:05, iclelland wrote: > ...
3 years, 4 months ago (2017-08-02 20:34:20 UTC) #21
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/2555333006/60001
3 years, 4 months ago (2017-08-03 00:04:03 UTC) #26
commit-bot: I haz the power
3 years, 4 months ago (2017-08-03 01:40:02 UTC) #30
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/334e05fb8a8035585a25b1ce4194...

Powered by Google App Engine
This is Rietveld 408576698