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

Issue 2733823005: Add tests for the JobController's observer. (Closed)

Created:
3 years, 9 months ago by harkness
Modified:
3 years, 9 months ago
Reviewers:
Peter Beverloo
CC:
chromium-reviews, Peter Beverloo, darin-cc_chromium.org, jam, harkness+watch_chromium.org, awdf+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add tests for the JobController's observer. Update the mock DownloadManager to keep track of DownloadItems which have been created and allow the test to update those items. Also added tests which explicitly update the DownloadItems and trigger the DownloadItem::Observer to check that the JobController is doing the right thing when successful updates happen. BUG=692621 Review-Url: https://codereview.chromium.org/2733823005 Cr-Commit-Position: refs/heads/master@{#457116} Committed: https://chromium.googlesource.com/chromium/src/+/e816138fb520f5fc8a2207212845554226af8226

Patch Set 1 #

Patch Set 2 : More comments #

Total comments: 8

Patch Set 3 : Code review comments #

Total comments: 4

Patch Set 4 : Comments & emplace usage #

Patch Set 5 : Rebase fixes and added RunLoop to DownloadUrl. #

Patch Set 6 : Rebase #

Patch Set 7 : Replace MockDownloadItemWithValues with FakeDownloadItem #

Total comments: 2

Patch Set 8 : naming changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -23 lines) Patch
M content/browser/background_fetch/background_fetch_job_controller_unittest.cc View 1 2 3 4 5 6 7 4 chunks +97 lines, -23 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 19 (9 generated)
harkness
3 years, 9 months ago (2017-03-08 14:38:39 UTC) #2
Peter Beverloo
https://codereview.chromium.org/2733823005/diff/20001/content/browser/background_fetch/background_fetch_job_controller_unittest.cc File content/browser/background_fetch/background_fetch_job_controller_unittest.cc (right): https://codereview.chromium.org/2733823005/diff/20001/content/browser/background_fetch/background_fetch_job_controller_unittest.cc#newcode39 content/browser/background_fetch/background_fetch_job_controller_unittest.cc:39: class MockDownloadItemWithValues : public MockDownloadItem { How about moving ...
3 years, 9 months ago (2017-03-10 00:55:14 UTC) #3
harkness
https://codereview.chromium.org/2733823005/diff/20001/content/browser/background_fetch/background_fetch_job_controller_unittest.cc File content/browser/background_fetch/background_fetch_job_controller_unittest.cc (right): https://codereview.chromium.org/2733823005/diff/20001/content/browser/background_fetch/background_fetch_job_controller_unittest.cc#newcode39 content/browser/background_fetch/background_fetch_job_controller_unittest.cc:39: class MockDownloadItemWithValues : public MockDownloadItem { On 2017/03/10 00:55:14, ...
3 years, 9 months ago (2017-03-10 13:50:58 UTC) #4
Peter Beverloo
lgtm % comment https://codereview.chromium.org/2733823005/diff/40001/content/browser/background_fetch/background_fetch_job_controller_unittest.cc File content/browser/background_fetch/background_fetch_job_controller_unittest.cc (right): https://codereview.chromium.org/2733823005/diff/40001/content/browser/background_fetch/background_fetch_job_controller_unittest.cc#newcode67 content/browser/background_fetch/background_fetch_job_controller_unittest.cc:67: // This is very inefficient, but ...
3 years, 9 months ago (2017-03-13 14:05:27 UTC) #5
harkness
Updated with code review changes and rebase updates. PTAL I had to add a RunLoop ...
3 years, 9 months ago (2017-03-13 15:53:13 UTC) #6
harkness
PTAL - ready for review! Converted tests to use FakeDownloadItem (now in content!) instead of ...
3 years, 9 months ago (2017-03-14 11:22:11 UTC) #11
Peter Beverloo
lgtm again Note that CLs that I've already lgtm'd tend to fall of my radar, ...
3 years, 9 months ago (2017-03-15 16:39:47 UTC) #12
harkness
https://codereview.chromium.org/2733823005/diff/120001/content/browser/background_fetch/background_fetch_job_controller_unittest.cc File content/browser/background_fetch/background_fetch_job_controller_unittest.cc (right): https://codereview.chromium.org/2733823005/diff/120001/content/browser/background_fetch/background_fetch_job_controller_unittest.cc#newcode139 content/browser/background_fetch/background_fetch_job_controller_unittest.cc:139: BackgroundFetchJobData* job_data = job_data_ptr.get(); On 2017/03/15 16:39:47, Peter Beverloo ...
3 years, 9 months ago (2017-03-15 16:51:04 UTC) #13
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/2733823005/140001
3 years, 9 months ago (2017-03-15 16:51:27 UTC) #16
commit-bot: I haz the power
3 years, 9 months ago (2017-03-15 17:20:15 UTC) #19
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/e816138fb520f5fc8a2207212845...

Powered by Google App Engine
This is Rietveld 408576698