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

Issue 2847003003: Fix SitePerProcessBrowserTest.ProcessTransferAfterError to not requiring modifying the mock HostRes… (Closed)

Created:
3 years, 7 months ago by jam
Modified:
3 years, 7 months ago
Reviewers:
Charlie Reis, scottmg
CC:
chromium-reviews, loading-reviews_chromium.org, jam, darin-cc_chromium.org, Randy Smith (Not in Mondays), mmenke
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix SitePerProcessBrowserTest.ProcessTransferAfterError to not requiring modifying the mock HostResolver when using the network service. This allows us to turn on the check that the host resolver isn't modified after SetUpOnMainThread in a future change. BUG=713847 Review-Url: https://codereview.chromium.org/2847003003 Cr-Commit-Position: refs/heads/master@{#468064} Committed: https://chromium.googlesource.com/chromium/src/+/bcc67886fb387a582da6a03263ede2487479ae21

Patch Set 1 #

Patch Set 2 : fix static #

Patch Set 3 : remove unnecessary include #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -11 lines) Patch
M content/browser/loader/navigation_url_loader_network_service.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader_network_service.cc View 1 4 chunks +17 lines, -2 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 6 chunks +51 lines, -3 lines 4 comments Download
M content/public/test/browser_test_base.cc View 2 chunks +14 lines, -6 lines 0 comments Download

Messages

Total messages: 26 (18 generated)
jam
FWIW I have audited all the usages outside of content, and this is still the ...
3 years, 7 months ago (2017-04-28 15:56:51 UTC) #11
scottmg
lgtm
3 years, 7 months ago (2017-04-28 16:42:52 UTC) #14
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/2847003003/60001
3 years, 7 months ago (2017-04-28 17:02:40 UTC) #18
Charlie Reis
https://codereview.chromium.org/2847003003/diff/60001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/2847003003/diff/60001/content/browser/site_per_process_browsertest.cc#newcode2497 content/browser/site_per_process_browsertest.cc:2497: host_resolver()->AddRule("*", "127.0.0.1"); Shouldn't there be an else branch here? ...
3 years, 7 months ago (2017-04-28 18:08:14 UTC) #20
jam
https://codereview.chromium.org/2847003003/diff/60001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/2847003003/diff/60001/content/browser/site_per_process_browsertest.cc#newcode2497 content/browser/site_per_process_browsertest.cc:2497: host_resolver()->AddRule("*", "127.0.0.1"); On 2017/04/28 18:08:14, Charlie Reis wrote: > ...
3 years, 7 months ago (2017-04-28 18:09:53 UTC) #21
Charlie Reis
https://codereview.chromium.org/2847003003/diff/60001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/2847003003/diff/60001/content/browser/site_per_process_browsertest.cc#newcode2497 content/browser/site_per_process_browsertest.cc:2497: host_resolver()->AddRule("*", "127.0.0.1"); On 2017/04/28 18:09:53, jam wrote: > On ...
3 years, 7 months ago (2017-04-28 18:14:52 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:60001) as https://chromium.googlesource.com/chromium/src/+/bcc67886fb387a582da6a03263ede2487479ae21
3 years, 7 months ago (2017-04-28 18:20:25 UTC) #25
jam
3 years, 7 months ago (2017-04-28 19:25:24 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/2847003003/diff/60001/content/browser/site_pe...
File content/browser/site_per_process_browsertest.cc (right):

https://codereview.chromium.org/2847003003/diff/60001/content/browser/site_pe...
content/browser/site_per_process_browsertest.cc:2497:
host_resolver()->AddRule("*", "127.0.0.1");
On 2017/04/28 18:14:52, Charlie Reis wrote:
> On 2017/04/28 18:09:53, jam wrote:
> > On 2017/04/28 18:08:14, Charlie Reis wrote:
> > > Shouldn't there be an else branch here?  How would the request succeed the
> > > second time?
> > 
> > The URLLoaderFactory set above is only used for one request, after that it's
> > reset (might want to change this behavior later, but I'll leave that to be
> > driven by use cases)
> 
> Oh, ok.  That seems a bit non-obvious, but glad it's doing the right thing for
> the test, at least.

This was documented in the test method; but point taken that it would be easier
to understand if it was persistent. I'm quite sure this method will be used a
lot more soon, so I'll take that into account as I beef it up :)

Powered by Google App Engine
This is Rietveld 408576698