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

Issue 10542038: Rewrite DownloadsApiTest in C++. (Closed)

Created:
8 years, 6 months ago by benjhayden
Modified:
8 years, 5 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, rdsmith+dwatch_chromium.org
Visibility:
Public.

Description

Rewrite DownloadsApiTest in C++. This uses much less magic than the javascript version, so it's more robust and easier to debug and fix. Aaron is the primary reviewer since most of this is extensions-specific. Randy, none of this is particularly downloads-specific. You're welcome to review or mute. ExtensionDownloadsEventRouter sends a chrome::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT notification whenever it fires an event. DownloadsEventsListener is-a content::NotificationObserver that listens for chrome::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT and logs them. DEL facilitates waiting for specific events by running the message loops. BrowserContext::GetFileSystemContext() is used to create HTML5 FileSystem Files. Empty extensions are used because DownloadsDownloadFunction relies on its host permissions mechanisms. I considered grouping all of the new TEST_Fs in a single large TEST_F in order to amortize start-up cost, but that would have required a comment explaining how to disable sub-sections, and it would have complicated time-outs. Besides, most bots can parallelize. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144807 Reverted due to word length mismatch bug in downloads_api_unittest.cc:1581: https://chromiumcodereview.appspot.com/10700024/ Trying again with %d and static_cast<int>(). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144921

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Patch Set 11 : . #

Patch Set 12 : . #

Patch Set 13 : . #

Patch Set 14 : . #

Patch Set 15 : . #

Patch Set 16 : . #

Patch Set 17 : . #

Total comments: 61

Patch Set 18 : comments #

Total comments: 4

Patch Set 19 : . #

Patch Set 20 : comments #

Patch Set 21 : . #

Patch Set 22 : . #

Patch Set 23 : . #

Patch Set 24 : . #

Patch Set 25 : . #

Patch Set 26 : . #

Patch Set 27 : . #

Patch Set 28 : merge #

Patch Set 29 : . #

Patch Set 30 : . #

Patch Set 31 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1301 lines, -1230 lines) Patch
M chrome/browser/download/chrome_download_manager_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 4 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 6 chunks +20 lines, -23 lines 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 30 chunks +1250 lines, -58 lines 0 comments Download
D chrome/browser/extensions/api/downloads/downloads_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -29 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/chrome_notification_types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +5 lines, -0 lines 0 comments Download
D chrome/test/data/extensions/api_test/downloads/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -15 lines 0 comments Download
D chrome/test/data/extensions/api_test/downloads/test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -1100 lines 0 comments Download
A chrome/test/data/extensions/api_test/downloads_split/empty.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/downloads_split/manifest.json View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
benjhayden
PTAL
8 years, 6 months ago (2012-06-15 17:14:40 UTC) #1
benjhayden
I updated the CL description to be a little more helpful. I still need to ...
8 years, 6 months ago (2012-06-18 15:57:05 UTC) #2
Randy Smith (Not in Mondays)
For whatever reason, I was inspired to do a thorough review (chrome/browser/download/ only). High level ...
8 years, 6 months ago (2012-06-18 18:42:58 UTC) #3
benjhayden
PTAL Still debugging windows. http://codereview.chromium.org/10542038/diff/24002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10542038/diff/24002/chrome/browser/download/download_extension_api.cc#newcode1113 chrome/browser/download/download_extension_api.cc:1113: profile_ = NULL; On 2012/06/18 ...
8 years, 6 months ago (2012-06-19 15:01:59 UTC) #4
Randy Smith (Not in Mondays)
Review still in process. http://codereview.chromium.org/10542038/diff/24002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10542038/diff/24002/chrome/browser/download/download_extension_api.cc#newcode1113 chrome/browser/download/download_extension_api.cc:1113: profile_ = NULL; On 2012/06/19 ...
8 years, 6 months ago (2012-06-19 19:23:22 UTC) #5
benjhayden
PTAL http://codereview.chromium.org/10542038/diff/24002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10542038/diff/24002/chrome/browser/download/download_extension_api.cc#newcode1113 chrome/browser/download/download_extension_api.cc:1113: profile_ = NULL; On 2012/06/19 19:23:23, rdsmith wrote: ...
8 years, 6 months ago (2012-06-21 17:50:48 UTC) #6
benjhayden
Note to self: investigate lifetimes of ExtensionSystem, EDER, Profile, etc. I've already added the log ...
8 years, 6 months ago (2012-06-21 21:03:45 UTC) #7
benjhayden
On 2012/06/21 21:03:45, benjhayden_chromium wrote: > Note to self: investigate lifetimes of ExtensionSystem, EDER, Profile, ...
8 years, 6 months ago (2012-06-25 21:24:49 UTC) #8
Randy Smith (Not in Mondays)
LGTM. Thanks!
8 years, 6 months ago (2012-06-26 16:16:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benjhayden@chromium.org/10542038/90001
8 years, 5 months ago (2012-06-28 16:50:45 UTC) #10
commit-bot: I haz the power
Try job failure for 10542038-90001 on mac_rel for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=36532 Step "update" is always ...
8 years, 5 months ago (2012-06-28 16:52:30 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benjhayden@chromium.org/10542038/105001
8 years, 5 months ago (2012-06-28 19:50:53 UTC) #12
commit-bot: I haz the power
Change committed as 144807
8 years, 5 months ago (2012-06-28 21:47:10 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benjhayden@chromium.org/10542038/84002
8 years, 5 months ago (2012-06-29 15:42:33 UTC) #14
commit-bot: I haz the power
8 years, 5 months ago (2012-06-29 17:30:36 UTC) #15
Change committed as 144921

Powered by Google App Engine
This is Rietveld 408576698