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

Issue 1203983004: Stop using SpawnedTestServer in DownloadContentTest.* (Closed)

Created:
5 years, 6 months ago by asanka
Modified:
5 years ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, jbudorick+watch_chromium.org, klundberg+watch_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop using SpawnedTestServer in DownloadContentTest.* This CL introduces TestDownloadRequestHandler, a URLRequestJob based interceptor that can be used to mock URLRequest behavior. The new request handler supports simulating network and server errors, and is a replacement for the testserver.py based test setup //content is currently using to test download resumption. Moving away from SpawnedTestServer allows us to re-enable the tests on Android. R=rdsmith@chromium.org,svaldez@chromium.org,sky@chromium.org BUG=215894 BUG=493347 BUG=7648 Committed: https://crrev.com/c7bf9bf1624d05928bbd4ee58d2c5e377fd6cd04 Cr-Commit-Position: refs/heads/master@{#363108}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 6

Patch Set 5 : #

Total comments: 60

Patch Set 6 : Address comments #

Total comments: 22

Patch Set 7 : Move If-Range change out to a separate CL. #

Total comments: 2

Patch Set 8 : #

Patch Set 9 : Address comments. #

Total comments: 6

Patch Set 10 : Comment updates #

Total comments: 2

Patch Set 11 : (merge with origin/master) #

Patch Set 12 : Catch up with changes to ReadRawData. #

Patch Set 13 : Catch up with ReadRawData changes and add MSVC friendly move assignment operator. #

Patch Set 14 : MSVC doesn't want to make default move constructors either. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1415 lines, -720 lines) Patch
M build/android/pylib/gtest/filter/content_browsertests_disabled View 1 1 chunk +0 lines, -11 lines 0 comments Download
M content/browser/download/download_browsertest.cc View 1 2 3 4 5 6 7 8 27 chunks +436 lines, -560 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
A content/public/test/test_download_request_handler.h View 1 2 3 4 5 6 7 8 9 1 chunk +306 lines, -0 lines 0 comments Download
A content/public/test/test_download_request_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +671 lines, -0 lines 0 comments Download
M net/test/embedded_test_server/default_handlers.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M net/tools/testserver/testserver.py View 1 2 3 4 5 6 7 2 chunks +0 lines, -148 lines 0 comments Download

Messages

Total messages: 56 (22 generated)
asanka
svaldez: This CL adds a URLRequestJob that can inject errors into a URL request. There's ...
5 years, 1 month ago (2015-11-06 22:28:37 UTC) #3
svaldez
On 2015/11/06 22:28:37, asanka wrote: > svaldez: This CL adds a URLRequestJob that can inject ...
5 years, 1 month ago (2015-11-09 14:52:21 UTC) #4
asanka
On 2015/11/09 at 14:52:21, svaldez wrote: > On 2015/11/06 22:28:37, asanka wrote: > > svaldez: ...
5 years, 1 month ago (2015-11-09 15:39:34 UTC) #5
asanka
Ok. Mailing the CL out in earnest. rdsmith: Review everything. svaldez is your apprentice and ...
5 years, 1 month ago (2015-11-11 20:07:20 UTC) #8
svaldez
Haven't really looked at download_browsertest or test_download_request_handler yet, I'll try taking a look on my ...
5 years, 1 month ago (2015-11-11 20:42:41 UTC) #9
asanka
https://codereview.chromium.org/1203983004/diff/60001/content/browser/download/download_browsertest.cc File content/browser/download/download_browsertest.cc (right): https://codereview.chromium.org/1203983004/diff/60001/content/browser/download/download_browsertest.cc#newcode1445 content/browser/download/download_browsertest.cc:1445: ASSERT_TRUE(origin_one.InitializeAndWaitUntilReady()); On 2015/11/11 at 20:42:41, svaldez wrote: > Use ...
5 years, 1 month ago (2015-11-11 20:57:26 UTC) #11
Randy Smith (Not in Mondays)
Cool! Does that mean I can send him up against some clearly superior opponent, secure ...
5 years, 1 month ago (2015-11-12 00:57:58 UTC) #12
svaldez
https://codereview.chromium.org/1203983004/diff/100001/content/browser/download/download_browsertest.cc File content/browser/download/download_browsertest.cc (right): https://codereview.chromium.org/1203983004/diff/100001/content/browser/download/download_browsertest.cc#newcode432 content/browser/download/download_browsertest.cc:432: return download->GetState() == DownloadItem::COMPLETE; Might just want to merge ...
5 years, 1 month ago (2015-11-12 20:25:51 UTC) #13
asanka
To notch reviews! A+++. Will send more CLs to review. No really. I've promised both ...
5 years, 1 month ago (2015-11-13 21:40:02 UTC) #14
asanka
https://codereview.chromium.org/1203983004/diff/100001/content/browser/download/download_browsertest.cc File content/browser/download/download_browsertest.cc (right): https://codereview.chromium.org/1203983004/diff/100001/content/browser/download/download_browsertest.cc#newcode659 content/browser/download/download_browsertest.cc:659: ASSERT_EQ(DownloadItem::IN_PROGRESS, download->GetState()); On 2015/11/13 at 21:40:01, asanka wrote: > ...
5 years, 1 month ago (2015-11-14 03:32:47 UTC) #15
Randy Smith (Not in Mondays)
Just sending a quick note to make Helen aware of this CL, as this is ...
5 years, 1 month ago (2015-11-16 21:13:59 UTC) #17
Randy Smith (Not in Mondays)
Next round. Once we reach closure on these, I'm happy, and these are pretty much ...
5 years, 1 month ago (2015-11-17 22:21:43 UTC) #18
xunjieli
I just landed https://codereview.chromium.org/1439953006/. Hope it will stick :) You might want to rebase.
5 years, 1 month ago (2015-11-18 14:36:30 UTC) #19
asanka
https://codereview.chromium.org/1203983004/diff/100001/content/public/test/test_download_request_handler.h File content/public/test/test_download_request_handler.h (right): https://codereview.chromium.org/1203983004/diff/100001/content/public/test/test_download_request_handler.h#newcode72 content/public/test/test_download_request_handler.h:72: Parameters(const Parameters& other); On 2015/11/17 at 22:21:42, rdsmith wrote: ...
5 years ago (2015-11-23 22:04:59 UTC) #20
Randy Smith (Not in Mondays)
https://codereview.chromium.org/1203983004/diff/120001/content/public/test/test_download_request_handler.cc File content/public/test/test_download_request_handler.cc (right): https://codereview.chromium.org/1203983004/diff/120001/content/public/test/test_download_request_handler.cc#newcode134 content/public/test/test_download_request_handler.cc:134: // asynchronously in order to avoid unexpected re-entrancy. On ...
5 years ago (2015-11-28 00:38:19 UTC) #21
asanka
https://codereview.chromium.org/1203983004/diff/120001/content/public/test/test_download_request_handler.cc File content/public/test/test_download_request_handler.cc (right): https://codereview.chromium.org/1203983004/diff/120001/content/public/test/test_download_request_handler.cc#newcode134 content/public/test/test_download_request_handler.cc:134: // asynchronously in order to avoid unexpected re-entrancy. On ...
5 years ago (2015-11-30 18:00:10 UTC) #22
Randy Smith (Not in Mondays)
lgtm https://codereview.chromium.org/1203983004/diff/180001/content/public/test/test_download_request_handler.cc File content/public/test/test_download_request_handler.cc (right): https://codereview.chromium.org/1203983004/diff/180001/content/public/test/test_download_request_handler.cc#newcode234 content/public/test/test_download_request_handler.cc:234: interceptor_->GetClientTaskRunner()->PostTask( On 2015/11/30 18:00:10, asanka wrote: > On ...
5 years ago (2015-11-30 18:38:24 UTC) #23
asanka
sky: Could you take a look at content/public/test/test_download_request_handler.* ? Justification for its existence is explained ...
5 years ago (2015-12-01 19:45:49 UTC) #26
sky
https://codereview.chromium.org/1203983004/diff/200001/content/public/test/test_download_request_handler.h File content/public/test/test_download_request_handler.h (right): https://codereview.chromium.org/1203983004/diff/200001/content/public/test/test_download_request_handler.h#newcode5 content/public/test/test_download_request_handler.h:5: #ifndef CONTENT_PUBLIC_TEST_TEST_DOWNLOAD_REQUEST_HANDLER_H_ Is there a reason this class needs ...
5 years ago (2015-12-01 21:58:50 UTC) #27
asanka
https://codereview.chromium.org/1203983004/diff/200001/content/public/test/test_download_request_handler.h File content/public/test/test_download_request_handler.h (right): https://codereview.chromium.org/1203983004/diff/200001/content/public/test/test_download_request_handler.h#newcode5 content/public/test/test_download_request_handler.h:5: #ifndef CONTENT_PUBLIC_TEST_TEST_DOWNLOAD_REQUEST_HANDLER_H_ On 2015/12/01 at 21:58:50, sky wrote: > ...
5 years ago (2015-12-02 15:41:34 UTC) #28
sky
On 2015/12/02 15:41:34, asanka wrote: > https://codereview.chromium.org/1203983004/diff/200001/content/public/test/test_download_request_handler.h > File content/public/test/test_download_request_handler.h (right): > > https://codereview.chromium.org/1203983004/diff/200001/content/public/test/test_download_request_handler.h#newcode5 > ...
5 years ago (2015-12-02 18:30:57 UTC) #29
Randy Smith (Not in Mondays)
On 2015/12/02 18:30:57, sky wrote: > On 2015/12/02 15:41:34, asanka wrote: > > > https://codereview.chromium.org/1203983004/diff/200001/content/public/test/test_download_request_handler.h ...
5 years ago (2015-12-02 18:35:27 UTC) #30
sky
I likely am: LGTM
5 years ago (2015-12-02 20:06:59 UTC) #31
asanka
Thanks everyone!
5 years ago (2015-12-02 21:02:41 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1203983004/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1203983004/200001
5 years ago (2015-12-02 21:03:47 UTC) #34
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/114452) mac_chromium_compile_dbg_ng on ...
5 years ago (2015-12-02 21:14:43 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1203983004/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1203983004/260001
5 years ago (2015-12-03 17:11:52 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/139138)
5 years ago (2015-12-03 18:00:56 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1203983004/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1203983004/280001
5 years ago (2015-12-03 18:57:23 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-03 21:41:18 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1203983004/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1203983004/280001
5 years ago (2015-12-04 02:05:04 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1203983004/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1203983004/280001
5 years ago (2015-12-04 03:25:15 UTC) #53
commit-bot: I haz the power
Committed patchset #14 (id:280001)
5 years ago (2015-12-04 03:53:16 UTC) #54
commit-bot: I haz the power
5 years ago (2015-12-04 03:54:17 UTC) #56
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/c7bf9bf1624d05928bbd4ee58d2c5e377fd6cd04
Cr-Commit-Position: refs/heads/master@{#363108}

Powered by Google App Engine
This is Rietveld 408576698