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

Issue 2543633004: Fix a pair of ResourceLoader cancellation/error bugs. (Closed)

Created:
4 years ago by mmenke
Modified:
4 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, jam, Randy Smith (Not in Mondays), darin-cc_chromium.org, loading-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a pair of ResourceLoader cancellation/error bugs. Both of these would result in two completion messages being passed down the ResourceHandler chain. Also add a bunch of tests of various flows through ResourceLoader, one of which is disabled due to yet another bug (Which I'll fix in another CL), and make the ResourceLoader tests use the same TestResourceHandler that the MIME sniffing / intercepting ResourceHandler tests use. BUG=669709 Committed: https://crrev.com/1d5e2e389193fc814291e64469a9b28d3412a9e9 Cr-Commit-Position: refs/heads/master@{#436732}

Patch Set 1 #

Patch Set 2 : Check RDHDelegate calls #

Patch Set 3 : Fix cert tests, add out-of-band cancel tests #

Total comments: 9

Patch Set 4 : Update comments #

Patch Set 5 : Remove old test handler (No longer being used) #

Total comments: 29

Patch Set 6 : Response to comments #

Patch Set 7 : Merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+767 lines, -288 lines) Patch
M content/browser/loader/intercepting_resource_handler_unittest.cc View 4 chunks +19 lines, -0 lines 0 comments Download
M content/browser/loader/resource_loader.cc View 1 2 3 4 5 6 3 chunks +10 lines, -12 lines 0 comments Download
M content/browser/loader/resource_loader_unittest.cc View 1 2 3 4 5 24 chunks +535 lines, -257 lines 0 comments Download
M content/browser/loader/test_resource_handler.h View 1 2 3 4 5 6 7 chunks +85 lines, -6 lines 0 comments Download
M content/browser/loader/test_resource_handler.cc View 1 2 3 4 5 4 chunks +98 lines, -13 lines 0 comments Download
M net/url_request/url_request_test_job.h View 2 chunks +4 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_job.cc View 3 chunks +16 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 47 (30 generated)
mmenke
I'm perhaps going overboard with the EXPECTS, but I really don't trust the ResourceLoader code. ...
4 years ago (2016-12-01 16:37:18 UTC) #13
mmenke
On 2016/12/01 16:37:18, mmenke wrote: > I'm perhaps going overboard with the EXPECTS, but I ...
4 years ago (2016-12-01 16:42:30 UTC) #14
Randy Smith (Not in Mondays)
Which specific test failures prompted the ResourceLoader() change? I'm wanting to make sure I understand ...
4 years ago (2016-12-01 20:12:52 UTC) #17
mmenke
Without the ResourceLoader changes, ResourceLoaderTest.SyncCancelOnWillRead, ResourceLoaderTest.SyncCancelOnResponseStarted and ResourceLoaderTest.RequestFailsOnReadSync tests all fail, due to double ResponseCompleted ...
4 years ago (2016-12-01 20:47:44 UTC) #20
Randy Smith (Not in Mondays)
For the record, a) Based on the code tracing I've been doing I am completely ...
4 years ago (2016-12-02 20:38:55 UTC) #23
mmenke
Please let me know if I've missed anything, or if you want more of a ...
4 years ago (2016-12-02 21:26:52 UTC) #26
mmenke
Just realized we need more tests, I'll add them in another CL. In all of ...
4 years ago (2016-12-02 21:32:47 UTC) #27
mmenke
https://codereview.chromium.org/2543633004/diff/80001/content/browser/loader/test_resource_handler.cc File content/browser/loader/test_resource_handler.cc (right): https://codereview.chromium.org/2543633004/diff/80001/content/browser/loader/test_resource_handler.cc#newcode171 content/browser/loader/test_resource_handler.cc:171: controller_->Resume(); On 2016/12/02 21:26:52, mmenke wrote: > On 2016/12/02 ...
4 years ago (2016-12-02 21:39:54 UTC) #28
Randy Smith (Not in Mondays)
LGTM; notes below are suggestions. https://codereview.chromium.org/2543633004/diff/80001/content/browser/loader/intercepting_resource_handler_unittest.cc File content/browser/loader/intercepting_resource_handler_unittest.cc (right): https://codereview.chromium.org/2543633004/diff/80001/content/browser/loader/intercepting_resource_handler_unittest.cc#newcode239 content/browser/loader/intercepting_resource_handler_unittest.cc:239: // entirely? On 2016/12/02 ...
4 years ago (2016-12-06 20:46:44 UTC) #33
mmenke
Thanks for the review! I'll file a bug about the EOF-inconsistency. https://codereview.chromium.org/2543633004/diff/80001/content/browser/loader/resource_loader_unittest.cc File content/browser/loader/resource_loader_unittest.cc (right): ...
4 years ago (2016-12-06 21:09:53 UTC) #36
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/2543633004/120001
4 years ago (2016-12-06 21:10:51 UTC) #38
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years ago (2016-12-06 21:25:15 UTC) #41
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/1d5e2e389193fc814291e64469a9b28d3412a9e9 Cr-Commit-Position: refs/heads/master@{#436732}
4 years ago (2016-12-06 21:29:05 UTC) #43
carlosk
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2557433005/ by carlosk@chromium.org. ...
4 years ago (2016-12-06 23:15:19 UTC) #44
carlosk
Example failures: - https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Mac10.11%20%28dbg%29/builds/6280 - https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Mac10.9/builds/40423 - https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Linux%20Trusty%20Leak/builds/539 - https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Win7/builds/48507
4 years ago (2016-12-06 23:36:41 UTC) #45
carlosk
FYI the revert did fix those test crashes. (it also caused iOS build errors that ...
4 years ago (2016-12-07 00:38:13 UTC) #46
mmenke
4 years ago (2016-12-07 02:42:42 UTC) #47
Message was sent while issue was closed.
On 2016/12/07 00:38:13, carlosk wrote:
> FYI the revert did fix those test crashes.
> 
> (it also caused iOS build errors that caused the tree to close probably due to
> some crazy combination of #include changes (which I could not pinpoint). But
> that's a different story... :) )

Hrm...Only test_url_request_context is built on iOS, and that doesn't modify
includes.

Powered by Google App Engine
This is Rietveld 408576698