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

Issue 541743002: Move url_request_mock_http_job to net/test/url_request/ (Closed)

Created:
6 years, 3 months ago by xunjieli
Modified:
6 years, 3 months ago
Reviewers:
asanka, Avi (use Gerrit), Lei Zhang, littleone691, pastarmovj, mmenke
CC:
chromium-reviews, asanka, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, jennb, darin-cc_chromium.org, gavinp+prer_chromium.org, benjhayden+dwatch_chromium.org, yoshiki+watch_chromium.org, jam, Dmitry Titov, dcheng, tburkard+watch_chromium.org, dominich+watch_chromium.org, stuartmorgan+watch_chromium.org, jianli, davidben+watch_chromium.org, chromium-apps-reviews_chromium.org, markusheintz_, rginda+watch_chromium.org, jshin+watch_chromium.org, mef
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Move url_request_mock_http_job to net/test/url_request/ This CL is a part of the effort to move mock URLRequestJob files from content/test/net to net/test/url_request/. The reason for this refactoring is that Cronet will need to use these classes for testing, so it will be nice if they can be in net/test, as the dependency can work out nicely. BUG= Committed: https://crrev.com/0332c191aa02efc6c24d0c87a1d41b7c12d3b8a8 Cr-Commit-Position: refs/heads/master@{#294255}

Patch Set 1 #

Patch Set 2 : style fix #

Patch Set 3 : Fixed a few compile errors #

Total comments: 15

Patch Set 4 : Used make_scoped_refptr in Bind and addressed comments #

Patch Set 5 : Fixed one unmatched brace #

Total comments: 8

Patch Set 6 : Addressed comments #

Total comments: 8

Patch Set 7 : Addressed comments #

Total comments: 5

Patch Set 8 : Addressed comments #

Patch Set 9 : removed unwanted new lines #

Total comments: 2

Patch Set 10 : rebase and fix indentation #

Total comments: 5

Patch Set 11 : fix format and raw header problem #

Patch Set 12 : fixed crash in policy_browsertests.cc #

Patch Set 13 : rebased #

Total comments: 2

Patch Set 14 : Removed unused import #

Total comments: 6

Patch Set 15 : Addressed comments to remove unnecessary content:: #

Patch Set 16 : added content:: back to one file #

Patch Set 17 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+351 lines, -434 lines) Patch
M chrome/browser/browser_encoding_browsertest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/captive_portal/captive_portal_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +17 lines, -7 lines 0 comments Download
M chrome/browser/content_settings/content_settings_browsertest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/download/download_browsertest.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/download/save_page_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/errorpage_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +14 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/lifetime/browser_close_manager_browsertest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/net/dns_probe_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/net/url_request_mock_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/plugins/npapi_infobar_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/policy/cloud/test_request_interceptor.cc View 1 2 3 4 5 6 7 8 9 10 15 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +17 lines, -8 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +17 lines, -7 lines 0 comments Download
M chrome/browser/prerender/prerender_tracker_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/panels/panel_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/unload_browsertest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/database_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/download/download_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 12 chunks +18 lines, -12 lines 0 comments Download
M content/browser/download/drag_download_file_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +12 lines, -7 lines 0 comments Download
M content/browser/download/save_package_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +10 lines, -7 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +9 lines, -4 lines 0 comments Download
M content/browser/plugin_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 13 14 15 16 5 chunks +12 lines, -11 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -2 lines 0 comments Download
D content/test/net/url_request_mock_http_job.h View 1 chunk +0 lines, -75 lines 0 comments Download
D content/test/net/url_request_mock_http_job.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -190 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
A net/test/url_request/url_request_mock_http_job.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +92 lines, -0 lines 0 comments Download
A + net/test/url_request/url_request_mock_http_job.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +74 lines, -54 lines 0 comments Download

Messages

Total messages: 53 (17 generated)
xunjieli
Hi Matt, This is the CL that we talked about. Could you take a look? ...
6 years, 3 months ago (2014-09-04 17:25:00 UTC) #2
mmenke
This looks really good. https://codereview.chromium.org/541743002/diff/40001/content/browser/loader/resource_dispatcher_host_browsertest.cc File content/browser/loader/resource_dispatcher_host_browsertest.cc (right): https://codereview.chromium.org/541743002/diff/40001/content/browser/loader/resource_dispatcher_host_browsertest.cc#newcode43 content/browser/loader/resource_dispatcher_host_browsertest.cc:43: content::BrowserThread::GetBlockingPool())); I think you need ...
6 years, 3 months ago (2014-09-04 18:05:12 UTC) #3
xunjieli
Thanks Matt! I have addressed your comments. PTAL. Thanks! https://codereview.chromium.org/541743002/diff/40001/content/browser/loader/resource_dispatcher_host_browsertest.cc File content/browser/loader/resource_dispatcher_host_browsertest.cc (right): https://codereview.chromium.org/541743002/diff/40001/content/browser/loader/resource_dispatcher_host_browsertest.cc#newcode43 content/browser/loader/resource_dispatcher_host_browsertest.cc:43: ...
6 years, 3 months ago (2014-09-04 18:44:25 UTC) #5
mmenke
https://codereview.chromium.org/541743002/diff/100001/net/test/url_request/url_request_mock_http_job.cc File net/test/url_request/url_request_mock_http_job.cc (right): https://codereview.chromium.org/541743002/diff/100001/net/test/url_request/url_request_mock_http_job.cc#newcode8 net/test/url_request/url_request_mock_http_job.cc:8: #include "base/macros.h" This should be in the header file ...
6 years, 3 months ago (2014-09-04 19:02:38 UTC) #6
xunjieli
Thanks Matt! https://codereview.chromium.org/541743002/diff/40001/net/test/url_request/url_request_mock_http_job.h File net/test/url_request/url_request_mock_http_job.h (right): https://codereview.chromium.org/541743002/diff/40001/net/test/url_request/url_request_mock_http_job.h#newcode12 net/test/url_request/url_request_mock_http_job.h:12: #include "net/url_request/url_request_file_job.h" On 2014/09/04 18:05:12, mmenke wrote: ...
6 years, 3 months ago (2014-09-04 19:24:16 UTC) #7
mmenke
I'll carefully go over this tomorrow, will probably be the last pass.
6 years, 3 months ago (2014-09-04 19:43:44 UTC) #8
mmenke
https://codereview.chromium.org/541743002/diff/120001/net/test/url_request/url_request_mock_http_job.cc File net/test/url_request/url_request_mock_http_job.cc (right): https://codereview.chromium.org/541743002/diff/120001/net/test/url_request/url_request_mock_http_job.cc#newcode151 net/test/url_request/url_request_mock_http_job.cc:151: base::ThreadRestrictions::SetIOAllowed(true); This has me rather concerned - this basically ...
6 years, 3 months ago (2014-09-05 15:54:10 UTC) #9
xunjieli
Thanks Matt! PTAL https://codereview.chromium.org/541743002/diff/120001/net/test/url_request/url_request_mock_http_job.cc File net/test/url_request/url_request_mock_http_job.cc (right): https://codereview.chromium.org/541743002/diff/120001/net/test/url_request/url_request_mock_http_job.cc#newcode151 net/test/url_request/url_request_mock_http_job.cc:151: base::ThreadRestrictions::SetIOAllowed(true); Done. If it's a problem, ...
6 years, 3 months ago (2014-09-05 19:26:15 UTC) #10
mmenke
Just two things, and I'm good. Not sure why the bots are unhappy. https://codereview.chromium.org/541743002/diff/140001/net/test/url_request/url_request_mock_http_job.cc File ...
6 years, 3 months ago (2014-09-05 20:06:15 UTC) #11
xunjieli
Thanks Matt! PTAL https://codereview.chromium.org/541743002/diff/140001/net/test/url_request/url_request_mock_http_job.cc File net/test/url_request/url_request_mock_http_job.cc (right): https://codereview.chromium.org/541743002/diff/140001/net/test/url_request/url_request_mock_http_job.cc#newcode133 net/test/url_request/url_request_mock_http_job.cc:133: base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)), On 2014/09/05 20:06:15, mmenke wrote: ...
6 years, 3 months ago (2014-09-05 20:59:45 UTC) #12
mmenke
Ahh, looks like you'll need to rebase because of changes to content/browser/download/download_browsertest.cc. Do you know ...
6 years, 3 months ago (2014-09-05 21:10:29 UTC) #13
xunjieli
Thanks Matt for catching the indentation part! I rebased and am running try jobs now. ...
6 years, 3 months ago (2014-09-05 21:16:39 UTC) #14
mmenke
On 2014/09/05 21:16:39, xunjieli1 wrote: > Thanks Matt for catching the indentation part! I rebased ...
6 years, 3 months ago (2014-09-08 16:20:17 UTC) #15
littleone691_gmail.com
thanks On Mon, Sep 8, 2014 at 12:20 PM, <mmenke@chromium.org> wrote: > On 2014/09/05 21:16:39, ...
6 years, 3 months ago (2014-09-08 16:22:03 UTC) #16
chromium-reviews
Thanks Matt! I will start investigating. Asanka suggested me to look into DownloadOctetStream which is ...
6 years, 3 months ago (2014-09-08 18:10:13 UTC) #17
asanka
https://codereview.chromium.org/541743002/diff/200001/net/test/url_request/url_request_mock_http_job.cc File net/test/url_request/url_request_mock_http_job.cc (right): https://codereview.chromium.org/541743002/diff/200001/net/test/url_request/url_request_mock_http_job.cc#newcode171 net/test/url_request/url_request_mock_http_job.cc:171: weak_ptr_factory_.GetWeakPtr())); Nit: Run this change through 'git cl format'. ...
6 years, 3 months ago (2014-09-08 18:51:44 UTC) #19
xunjieli
Still investigating why some of the tests timeout. Uploading a patch to fix the two ...
6 years, 3 months ago (2014-09-08 19:00:22 UTC) #20
mmenke
https://codereview.chromium.org/541743002/diff/200001/net/test/url_request/url_request_mock_http_job.cc File net/test/url_request/url_request_mock_http_job.cc (right): https://codereview.chromium.org/541743002/diff/200001/net/test/url_request/url_request_mock_http_job.cc#newcode176 net/test/url_request/url_request_mock_http_job.cc:176: ReplaceSubstringsAfterOffset(&raw_headers_, 0, "\r\n", "\n"); On 2014/09/08 19:00:22, xunjieli1 wrote: ...
6 years, 3 months ago (2014-09-08 19:14:31 UTC) #21
xunjieli
On 2014/09/08 19:14:31, mmenke wrote: > https://codereview.chromium.org/541743002/diff/200001/net/test/url_request/url_request_mock_http_job.cc > File net/test/url_request/url_request_mock_http_job.cc (right): > > https://codereview.chromium.org/541743002/diff/200001/net/test/url_request/url_request_mock_http_job.cc#newcode176 > ...
6 years, 3 months ago (2014-09-08 19:21:52 UTC) #22
xunjieli
Matt, try jobs are all green now! (except linux_redux, which has been failing for other ...
6 years, 3 months ago (2014-09-09 21:02:15 UTC) #25
mmenke
LGTM. So you'll need owners signoffs to land this. I suggest getting a browser/policy owner ...
6 years, 3 months ago (2014-09-09 21:15:23 UTC) #26
xunjieli
+pastarmovj for browser/policy +avi for content/ +thestig for chrome/ Hi pastarmovj, avi and thesig, could ...
6 years, 3 months ago (2014-09-09 21:28:16 UTC) #28
Lei Zhang
chrome/ sans c/b/{net,policy} gltm with some nits. https://codereview.chromium.org/541743002/diff/310001/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc File chrome/browser/browsing_data/browsing_data_remover_browsertest.cc (right): https://codereview.chromium.org/541743002/diff/310001/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc#newcode33 chrome/browser/browsing_data/browsing_data_remover_browsertest.cc:33: path, content::BrowserThread::GetBlockingPool()); ...
6 years, 3 months ago (2014-09-09 21:37:59 UTC) #29
Avi (use Gerrit)
content lgtm
6 years, 3 months ago (2014-09-09 21:38:56 UTC) #30
pastarmovj
policy lgtm
6 years, 3 months ago (2014-09-09 21:42:35 UTC) #31
xunjieli
Thanks for the reviews! thesig@, could you take another look? https://codereview.chromium.org/541743002/diff/310001/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc File chrome/browser/browsing_data/browsing_data_remover_browsertest.cc (right): https://codereview.chromium.org/541743002/diff/310001/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc#newcode33 ...
6 years, 3 months ago (2014-09-09 22:08:59 UTC) #32
Lei Zhang
lgtm
6 years, 3 months ago (2014-09-09 22:11:33 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xunjieli@chromium.org/541743002/330001
6 years, 3 months ago (2014-09-09 22:13:15 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/64679) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/53679) linux_chromium_chromeos_rel_swarming ...
6 years, 3 months ago (2014-09-09 22:38:21 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xunjieli@chromium.org/541743002/350001
6 years, 3 months ago (2014-09-10 00:30:02 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/3473) android_clang_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/3300) android_dbg_tests_recipe ...
6 years, 3 months ago (2014-09-10 01:33:59 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xunjieli@chromium.org/541743002/370001
6 years, 3 months ago (2014-09-10 14:02:10 UTC) #47
commit-bot: I haz the power
Failed to commit the patch.
6 years, 3 months ago (2014-09-10 22:42:31 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/541743002/370001
6 years, 3 months ago (2014-09-10 23:18:01 UTC) #51
commit-bot: I haz the power
Committed patchset #17 (id:370001) as 82ad9867f1f222c6d08728ba3702775a8ed1310d
6 years, 3 months ago (2014-09-10 23:25:05 UTC) #52
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 23:27:22 UTC) #53
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/0332c191aa02efc6c24d0c87a1d41b7c12d3b8a8
Cr-Commit-Position: refs/heads/master@{#294255}

Powered by Google App Engine
This is Rietveld 408576698