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

Issue 2932273002: ServiceWorker: use the id assigned to the provider host in unittests (Closed)

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

Description

ServiceWorker: use the id assigned to the provider host in unittests In several tests, currently provider's id is assigned to a variable which is initialized by some random value at the beginning of the test, the provider host instance is created by using the id, and some other objects are also initialized by the id. After browser-side SWProviderHost creation, it'll be problematic because the id will be assigned internally. This patch is to fix the tests by getting the id from ServiceWorkerProviderHost::provider_id() directly. This is split off from https://crrev.com/2779763004/ . BUG=629701, 676983, 668633 Review-Url: https://codereview.chromium.org/2932273002 Cr-Commit-Position: refs/heads/master@{#478560} Committed: https://chromium.googlesource.com/chromium/src/+/387a6b29a641d6721774f860c25fe85c47f821c0

Patch Set 1 #

Total comments: 2

Messages

Total messages: 15 (9 generated)
shimazu
ptal, thanks! :)
3 years, 6 months ago (2017-06-12 05:49:14 UTC) #5
falken
https://codereview.chromium.org/2932273002/diff/1/content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc File content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc (right): https://codereview.chromium.org/2932273002/diff/1/content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc#newcode344 content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc:344: helper_->mock_render_process_id(), provider_id, version_); Just to be sure, when the ...
3 years, 6 months ago (2017-06-12 06:33:07 UTC) #6
shimazu
https://codereview.chromium.org/2932273002/diff/1/content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc File content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc (right): https://codereview.chromium.org/2932273002/diff/1/content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc#newcode344 content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc:344: helper_->mock_render_process_id(), provider_id, version_); On 2017/06/12 06:33:07, falken wrote: > ...
3 years, 6 months ago (2017-06-12 06:40:55 UTC) #7
falken
Ah ok. lgtm
3 years, 6 months ago (2017-06-12 06:42:53 UTC) #8
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/2932273002/1
3 years, 6 months ago (2017-06-12 06:51:45 UTC) #12
commit-bot: I haz the power
3 years, 6 months ago (2017-06-12 07:09:27 UTC) #15
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/387a6b29a641d6721774f860c25f...

Powered by Google App Engine
This is Rietveld 408576698