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

Issue 248713004: [Downloads] Add real observers to MockDownloadItem. (Closed)

Created:
6 years, 8 months ago by asanka
Modified:
6 years, 7 months ago
CC:
chromium-reviews, benjhayden+dwatch_chromium.org, asanka, jam, darin-cc_chromium.org
Visibility:
Public.

Description

[Downloads] Add real observers to MockDownloadItem. Managing observer lists is needed by all the tests that end up calling DownloadItem::AddObserver. This CL adds real observers to MockDownloadItem so that tests don't need to mock this behavior. BUG=367311 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269585

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address comments. Rename methods in MockDownloadItem #

Patch Set 3 : Merge with r268551 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -245 lines) Patch
M chrome/browser/download/all_download_item_notifier_unittest.cc View 4 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/download/download_danger_prompt_browsertest.cc View 1 6 chunks +4 lines, -13 lines 0 comments Download
M chrome/browser/download/download_history_unittest.cc View 1 2 13 chunks +24 lines, -39 lines 0 comments Download
M chrome/browser/download/download_path_reservation_tracker_unittest.cc View 1 31 chunks +50 lines, -76 lines 0 comments Download
M chrome/browser/download/download_status_updater_unittest.cc View 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/download/download_ui_controller_unittest.cc View 1 9 chunks +5 lines, -24 lines 0 comments Download
M chrome/browser/plugins/plugin_installer_unittest.cc View 1 2 7 chunks +4 lines, -21 lines 0 comments Download
M chrome/browser/safe_browsing/download_protection_service_unittest.cc View 1 14 chunks +28 lines, -57 lines 0 comments Download
M content/public/test/mock_download_item.h View 1 3 chunks +18 lines, -2 lines 0 comments Download
M content/public/test/mock_download_item.cc View 1 1 chunk +24 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
asanka
6 years, 8 months ago (2014-04-23 05:43:46 UTC) #1
Randy Smith (Not in Mondays)
LGTM with below comments. https://codereview.chromium.org/248713004/diff/1/chrome/browser/download/download_path_reservation_tracker_unittest.cc File chrome/browser/download/download_path_reservation_tracker_unittest.cc (right): https://codereview.chromium.org/248713004/diff/1/chrome/browser/download/download_path_reservation_tracker_unittest.cc#newcode333 chrome/browser/download/download_path_reservation_tracker_unittest.cc:333: item2->UpdateObservers(); You do this often ...
6 years, 8 months ago (2014-04-23 19:28:35 UTC) #2
Randy Smith (Not in Mondays)
I find myself wondering if the MockDownloadManager could use a similar change. I haven't checked, ...
6 years, 8 months ago (2014-04-23 19:30:14 UTC) #3
asanka
I'll do another CL for the MockDownloadManager. https://codereview.chromium.org/248713004/diff/1/chrome/browser/download/download_path_reservation_tracker_unittest.cc File chrome/browser/download/download_path_reservation_tracker_unittest.cc (right): https://codereview.chromium.org/248713004/diff/1/chrome/browser/download/download_path_reservation_tracker_unittest.cc#newcode333 chrome/browser/download/download_path_reservation_tracker_unittest.cc:333: item2->UpdateObservers(); On ...
6 years, 8 months ago (2014-04-25 21:31:27 UTC) #4
asanka
Adding OWNERS: mattm: chrome/browser/safe_browsing/download_protection_service_unittest.cc phajdan.jr: content/public/test/mock_download_item.cc content/public/test/mock_download_item.h
6 years, 8 months ago (2014-04-25 22:19:16 UTC) #5
mattm
safe_browsing lgtm
6 years, 8 months ago (2014-04-25 23:30:33 UTC) #6
Paweł Hajdan Jr.
LGTM
6 years, 7 months ago (2014-04-28 10:58:59 UTC) #7
asanka
bauerb: Could you take a look at plugin_installer_unittest?
6 years, 7 months ago (2014-05-07 23:07:53 UTC) #8
Bernhard Bauer
chrome/browser/plugins LGTM, thanks!
6 years, 7 months ago (2014-05-09 14:25:04 UTC) #9
asanka
The CQ bit was checked by asanka@chromium.org
6 years, 7 months ago (2014-05-09 15:00:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asanka@chromium.org/248713004/40001
6 years, 7 months ago (2014-05-09 15:07:55 UTC) #11
commit-bot: I haz the power
6 years, 7 months ago (2014-05-10 18:04:53 UTC) #12
Message was sent while issue was closed.
Change committed as 269585

Powered by Google App Engine
This is Rietveld 408576698