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

Unified Diff: content/browser/download/download_browsertest.cc

Issue 1924473003: [Downloads] Use the initiating StoragePartition for resumption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/test/data/history/history.31.sql ('k') | content/browser/download/download_create_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index c8d5b06cb9c0ae02fd4540ed8899bcb25144b69d..5d78e1c7a8290d21658c24df3204fde2f14413be 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -1817,27 +1817,13 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeRestoredDownload_NoFile) {
url_chain.push_back(request_handler.url());
DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
- "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
- 1,
- intermediate_file_path,
- base::FilePath(),
- url_chain,
- GURL(),
- GURL(),
- GURL(),
- "application/octet-stream",
- "application/octet-stream",
- base::Time::Now(),
- base::Time(),
- parameters.etag,
- std::string(),
- kIntermediateSize,
- parameters.size,
- std::string(),
- DownloadItem::INTERRUPTED,
+ "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1, intermediate_file_path,
+ base::FilePath(), url_chain, GURL(), GURL(), GURL(), GURL(),
+ "application/octet-stream", "application/octet-stream", base::Time::Now(),
+ base::Time(), parameters.etag, std::string(), kIntermediateSize,
+ parameters.size, std::string(), DownloadItem::INTERRUPTED,
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
- false);
+ DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, false);
download->Resume();
WaitForCompletion(download);
@@ -1891,27 +1877,13 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeRestoredDownload_NoHash) {
url_chain.push_back(request_handler.url());
DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
- "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
- 1,
- intermediate_file_path,
- base::FilePath(),
- url_chain,
- GURL(),
- GURL(),
- GURL(),
- "application/octet-stream",
- "application/octet-stream",
- base::Time::Now(),
- base::Time(),
- parameters.etag,
- std::string(),
- kIntermediateSize,
- parameters.size,
- std::string(),
- DownloadItem::INTERRUPTED,
+ "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1, intermediate_file_path,
+ base::FilePath(), url_chain, GURL(), GURL(), GURL(), GURL(),
+ "application/octet-stream", "application/octet-stream", base::Time::Now(),
+ base::Time(), parameters.etag, std::string(), kIntermediateSize,
+ parameters.size, std::string(), DownloadItem::INTERRUPTED,
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
- false);
+ DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, false);
download->Resume();
WaitForCompletion(download);
@@ -1952,27 +1924,13 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest,
url_chain.push_back(request_handler.url());
DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
- "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
- 1,
- intermediate_file_path,
- base::FilePath(),
- url_chain,
- GURL(),
- GURL(),
- GURL(),
- "application/octet-stream",
- "application/octet-stream",
- base::Time::Now(),
- base::Time(),
- "fake-etag",
- std::string(),
- kIntermediateSize,
- parameters.size,
- std::string(),
- DownloadItem::INTERRUPTED,
+ "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1, intermediate_file_path,
+ base::FilePath(), url_chain, GURL(), GURL(), GURL(), GURL(),
+ "application/octet-stream", "application/octet-stream", base::Time::Now(),
+ base::Time(), "fake-etag", std::string(), kIntermediateSize,
+ parameters.size, std::string(), DownloadItem::INTERRUPTED,
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
- false);
+ DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, false);
download->Resume();
WaitForCompletion(download);
@@ -2018,27 +1976,14 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest,
url_chain.push_back(request_handler.url());
DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
- "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
- 1,
- intermediate_file_path,
- base::FilePath(),
- url_chain,
- GURL(),
- GURL(),
- GURL(),
- "application/octet-stream",
- "application/octet-stream",
- base::Time::Now(),
- base::Time(),
- parameters.etag,
- std::string(),
- kIntermediateSize,
+ "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1, intermediate_file_path,
+ base::FilePath(), url_chain, GURL(), GURL(), GURL(), GURL(),
+ "application/octet-stream", "application/octet-stream", base::Time::Now(),
+ base::Time(), parameters.etag, std::string(), kIntermediateSize,
parameters.size,
std::string(std::begin(kPartialHash), std::end(kPartialHash)),
- DownloadItem::INTERRUPTED,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
- false);
+ DownloadItem::INTERRUPTED, DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
+ DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, false);
download->Resume();
WaitForCompletion(download);
@@ -2090,27 +2035,14 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeRestoredDownload_WrongHash) {
url_chain.push_back(request_handler.url());
DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
- "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
- 1,
- intermediate_file_path,
- base::FilePath(),
- url_chain,
- GURL(),
- GURL(),
- GURL(),
- "application/octet-stream",
- "application/octet-stream",
- base::Time::Now(),
- base::Time(),
- parameters.etag,
- std::string(),
- kIntermediateSize,
+ "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1, intermediate_file_path,
+ base::FilePath(), url_chain, GURL(), GURL(), GURL(), GURL(),
+ "application/octet-stream", "application/octet-stream", base::Time::Now(),
+ base::Time(), parameters.etag, std::string(), kIntermediateSize,
parameters.size,
std::string(std::begin(kPartialHash), std::end(kPartialHash)),
- DownloadItem::INTERRUPTED,
- DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
- false);
+ DownloadItem::INTERRUPTED, DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
+ DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, false);
download->Resume();
WaitForCompletion(download);
@@ -2171,27 +2103,13 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeRestoredDownload_ShortFile) {
url_chain.push_back(request_handler.url());
DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
- "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
- 1,
- intermediate_file_path,
- base::FilePath(),
- url_chain,
- GURL(),
- GURL(),
- GURL(),
- "application/octet-stream",
- "application/octet-stream",
- base::Time::Now(),
- base::Time(),
- parameters.etag,
- std::string(),
- kIntermediateSize,
- parameters.size,
- std::string(),
- DownloadItem::INTERRUPTED,
+ "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1, intermediate_file_path,
+ base::FilePath(), url_chain, GURL(), GURL(), GURL(), GURL(),
+ "application/octet-stream", "application/octet-stream", base::Time::Now(),
+ base::Time(), parameters.etag, std::string(), kIntermediateSize,
+ parameters.size, std::string(), DownloadItem::INTERRUPTED,
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
- false);
+ DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, false);
download->Resume();
WaitForCompletion(download);
@@ -2250,27 +2168,13 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeRestoredDownload_LongFile) {
url_chain.push_back(request_handler.url());
DownloadItem* download = DownloadManagerForShell(shell())->CreateDownloadItem(
- "F7FB1F59-7DE1-4845-AFDB-8A688F70F583",
- 1,
- intermediate_file_path,
- base::FilePath(),
- url_chain,
- GURL(),
- GURL(),
- GURL(),
- "application/octet-stream",
- "application/octet-stream",
- base::Time::Now(),
- base::Time(),
- parameters.etag,
- std::string(),
- kIntermediateSize,
- parameters.size,
- std::string(),
- DownloadItem::INTERRUPTED,
+ "F7FB1F59-7DE1-4845-AFDB-8A688F70F583", 1, intermediate_file_path,
+ base::FilePath(), url_chain, GURL(), GURL(), GURL(), GURL(),
+ "application/octet-stream", "application/octet-stream", base::Time::Now(),
+ base::Time(), parameters.etag, std::string(), kIntermediateSize,
+ parameters.size, std::string(), DownloadItem::INTERRUPTED,
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
- DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
- false);
+ DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, false);
download->Resume();
WaitForCompletion(download);
« no previous file with comments | « components/test/data/history/history.31.sql ('k') | content/browser/download/download_create_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698