New issue
Advanced search Search tips

Issue 710576 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Implement browser test for parallel download, and make sure UrlRequest is deleted after parallel download is done.

Project Member Reported by xingliu@chromium.org, Apr 11 2017

Issue description

We should implement browser test for parallel download, since the download network code stack is mainly tested in browser tests instead of unit tests.

Currently some UrlRequestJob is not deleted when the download is done in the browser test, we should figure out if this is a real bug or merely caused by the test code.
 
When we null out the callback RegisterCallback(base::Closure()) of the ByteStreamReader in DownloadFileImpl, we need to figure out if the TCPSocket is disconnected evetuanlly.

https://cs.chromium.org/chromium/src/net/socket/tcp_socket.h?dr=C&ssfr=1&l=29
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b444a98187571cf9ec627ac52fee7e81ffcecb93

commit b444a98187571cf9ec627ac52fee7e81ffcecb93
Author: xingliu <xingliu@chromium.org>
Date: Tue Apr 18 18:09:49 2017

Fix an issue that we didn't clean url request properly.

The ByteStreamReader we used in DownloadFile does not support Close()
api, so we need to close the url request on UI thread if
"ByteStreamReader::Close" should be called.

Before we implement parallel download, we null out the callback on
ByteStreamReader during download interruption, and on UI thread, we
cancel the url request. But for parallel download, at some point, we
won't interrupt the download but need to cancel a particular request.

There is another CL that implements a browser test for parallel download and it will test the code here.
https://codereview.chromium.org/2819483002/

BUG= 710576 , 644352

Review-Url: https://codereview.chromium.org/2811293004
Cr-Commit-Position: refs/heads/master@{#465289}

[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_file.h
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_file_impl.cc
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_file_impl.h
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_file_unittest.cc
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_item_impl.cc
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_item_impl.h
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_item_impl_unittest.cc
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_job.cc
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/download_job.h
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/mock_download_file.cc
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/mock_download_file.h
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/parallel_download_job.cc
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/browser/download/parallel_download_job.h
[modify] https://crrev.com/b444a98187571cf9ec627ac52fee7e81ffcecb93/content/public/test/test_file_error_injector.cc

Labels: Merge-Request-59
Status: Fixed (was: Started)
This is needed to fix a parallel download issue, also another CL needs this to be merged first.
The link to the other CL that needs this to be merged. 

https://codereview.chromium.org/2823273004/

Labels: -Pri-3 Pri-2
Project Member

Comment 6 by sheriffbot@chromium.org, Apr 19 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 19 2017

Labels: -merge-approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b

commit 8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b
Author: Xing Liu <xingliu@chromium.org>
Date: Wed Apr 19 18:38:18 2017

Fix an issue that we didn't clean url request properly.

The ByteStreamReader we used in DownloadFile does not support Close()
api, so we need to close the url request on UI thread if
"ByteStreamReader::Close" should be called.

Before we implement parallel download, we null out the callback on
ByteStreamReader during download interruption, and on UI thread, we
cancel the url request. But for parallel download, at some point, we
won't interrupt the download but need to cancel a particular request.

There is another CL that implements a browser test for parallel download and it will test the code here.
https://codereview.chromium.org/2819483002/

BUG= 710576 , 644352

Review-Url: https://codereview.chromium.org/2811293004
Cr-Commit-Position: refs/heads/master@{#465289}
(cherry picked from commit b444a98187571cf9ec627ac52fee7e81ffcecb93)

Review-Url: https://codereview.chromium.org/2828073002 .
Cr-Commit-Position: refs/branch-heads/3071@{#60}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_file.h
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_file_impl.cc
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_file_impl.h
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_file_unittest.cc
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_item_impl.cc
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_item_impl.h
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_item_impl_unittest.cc
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_job.cc
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/download_job.h
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/mock_download_file.cc
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/mock_download_file.h
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/parallel_download_job.cc
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/browser/download/parallel_download_job.h
[modify] https://crrev.com/8cb70eaa5ea6568193561a95fc04bdcd4cd8fe4b/content/public/test/test_file_error_injector.cc

Sign in to add a comment