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

Issue 2654893002: Add unit tests for RedirectToFileResourceHandler. (Closed)

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

Description

Add unit tests for RedirectToFileResourceHandler. It had some integration tests, but no real unit tests. Also fix its behavior when a write synchronously succeeds, which would cause it to resume a request without first pausing it. The API for writing to files allows sync completion, though it currently never happens, so was not a visible bug. BUG=679483, 659317 Review-Url: https://codereview.chromium.org/2654893002 Cr-Commit-Position: refs/heads/master@{#446472} Committed: https://chromium.googlesource.com/chromium/src/+/9874e16e6ccd443a33d4207619e87c6fc6ad1dcd

Patch Set 1 #

Patch Set 2 : More tests, cleanup #

Patch Set 3 : fix #

Patch Set 4 : . #

Patch Set 5 : ... #

Patch Set 6 : Cleanup #

Patch Set 7 : More cleanup #

Patch Set 8 : Oops #

Total comments: 1

Patch Set 9 : Oops (x2) #

Patch Set 10 : Remove old tests, update comment #

Total comments: 25

Patch Set 11 : Response to comments #

Total comments: 2

Patch Set 12 : Add comment #

Patch Set 13 : Revise #

Unified diffs Side-by-side diffs Delta from patch set Stats (+891 lines, -260 lines) Patch
M content/browser/loader/redirect_to_file_resource_handler.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/loader/redirect_to_file_resource_handler.cc View 1 2 3 4 5 6 7 8 5 chunks +28 lines, -17 lines 0 comments Download
A content/browser/loader/redirect_to_file_resource_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +851 lines, -0 lines 0 comments Download
M content/browser/loader/resource_loader_unittest.cc View 1 2 3 4 5 6 7 8 9 6 chunks +0 lines, -243 lines 0 comments Download
M content/browser/loader/test_resource_handler.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 57 (46 generated)
mmenke
Think this one's ready for review. I'll rebase the other one on top if it ...
3 years, 11 months ago (2017-01-25 19:03:04 UTC) #31
mmenke
https://codereview.chromium.org/2654893002/diff/240001/content/browser/loader/resource_loader_unittest.cc File content/browser/loader/resource_loader_unittest.cc (left): https://codereview.chromium.org/2654893002/diff/240001/content/browser/loader/resource_loader_unittest.cc#oldcode1444 content/browser/loader/resource_loader_unittest.cc:1444: class ResourceLoaderRedirectToFileTest : public ResourceLoaderTest { Seems reasonable to ...
3 years, 11 months ago (2017-01-25 20:09:35 UTC) #36
Charlie Harrison
Looks good, just minor comments. I am impressed with how readable the tests are, great ...
3 years, 11 months ago (2017-01-26 16:44:48 UTC) #41
Charlie Harrison
Oh, I was also wondering if allocating so many big strings will be bad for ...
3 years, 11 months ago (2017-01-26 16:45:42 UTC) #42
mmenke
On 2017/01/26 16:45:42, Charlie Harrison wrote: > Oh, I was also wondering if allocating so ...
3 years, 11 months ago (2017-01-26 16:48:59 UTC) #43
mmenke
Thanks for the great feedback and speedy review! I didn't make all of your suggested ...
3 years, 11 months ago (2017-01-26 17:38:51 UTC) #46
Charlie Harrison
I'm okay with your choices. Let me scan the deleted tests to make sure we ...
3 years, 11 months ago (2017-01-26 18:20:32 UTC) #47
Charlie Harrison
LGTM with request for comment https://codereview.chromium.org/2654893002/diff/260001/content/browser/loader/redirect_to_file_resource_handler_unittest.cc File content/browser/loader/redirect_to_file_resource_handler_unittest.cc (right): https://codereview.chromium.org/2654893002/diff/260001/content/browser/loader/redirect_to_file_resource_handler_unittest.cc#newcode55 content/browser/loader/redirect_to_file_resource_handler_unittest.cc:55: enum class CompletionMode { ...
3 years, 11 months ago (2017-01-26 18:53:34 UTC) #50
mmenke
Thanks! https://codereview.chromium.org/2654893002/diff/260001/content/browser/loader/redirect_to_file_resource_handler_unittest.cc File content/browser/loader/redirect_to_file_resource_handler_unittest.cc (right): https://codereview.chromium.org/2654893002/diff/260001/content/browser/loader/redirect_to_file_resource_handler_unittest.cc#newcode55 content/browser/loader/redirect_to_file_resource_handler_unittest.cc:55: enum class CompletionMode { On 2017/01/26 18:53:34, Charlie ...
3 years, 11 months ago (2017-01-26 20:16:17 UTC) #51
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/2654893002/300001
3 years, 11 months ago (2017-01-26 20:16:56 UTC) #54
commit-bot: I haz the power
3 years, 11 months ago (2017-01-26 22:38:00 UTC) #57
Message was sent while issue was closed.
Committed patchset #13 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/9874e16e6ccd443a33d4207619e8...

Powered by Google App Engine
This is Rietveld 408576698