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

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

Issue 10696043: Shifted DownloadFile to exporting DownloadInterruptReasons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to TOT. Created 8 years, 6 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 | « no previous file | content/browser/download/download_file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 9de4e2cb87488b6a698a822e9d01cedbd6bd540b..e0d1e8c8955be5a6bc943abc7aeb670ba455a9ca 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -776,8 +776,8 @@ class DownloadTest : public InProcessBrowserTest {
content::TestFileErrorInjector::DebugString(
info.error_info.code)
<< " instance = " << info.error_info.operation_instance
- << " error = " << net::ErrorToString(
- info.error_info.net_error);
+ << " error = " << content::InterruptReasonDebugString(
+ info.error_info.error);
injector->ClearErrors();
injector->AddError(info.error_info);
@@ -2190,7 +2190,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_INITIALIZE,
0,
- net::ERR_FILE_NO_SPACE
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE,
}
},
{ // Direct download with injected "Disk full" error in Initialize().
@@ -2203,7 +2203,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_INITIALIZE,
0,
- net::ERR_FILE_NO_SPACE
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE,
}
},
{ // Navigated download with injected "Disk full" error in Write().
@@ -2216,7 +2216,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_WRITE,
0,
- net::ERR_FILE_NO_SPACE
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE,
}
},
{ // Direct download with injected "Disk full" error in Write().
@@ -2229,7 +2229,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_WRITE,
0,
- net::ERR_FILE_NO_SPACE
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE,
}
},
{ // Navigated download with injected "Failed" error in Initialize().
@@ -2242,7 +2242,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_INITIALIZE,
0,
- net::ERR_FAILED
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
}
},
{ // Direct download with injected "Failed" error in Initialize().
@@ -2255,7 +2255,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_INITIALIZE,
0,
- net::ERR_FAILED
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
}
},
{ // Navigated download with injected "Failed" error in Write().
@@ -2268,7 +2268,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_WRITE,
0,
- net::ERR_FAILED
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
}
},
{ // Direct download with injected "Failed" error in Write().
@@ -2281,7 +2281,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_WRITE,
0,
- net::ERR_FAILED
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
}
},
{ // Navigated download with injected "Name too long" error in
@@ -2295,7 +2295,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_INITIALIZE,
0,
- net::ERR_FILE_PATH_TOO_LONG
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG,
}
},
{ // Direct download with injected "Name too long" error in Initialize().
@@ -2308,7 +2308,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_INITIALIZE,
0,
- net::ERR_FILE_PATH_TOO_LONG
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG,
}
},
{ // Navigated download with injected "Name too long" error in Write().
@@ -2321,7 +2321,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_WRITE,
0,
- net::ERR_INVALID_HANDLE
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
}
},
{ // Direct download with injected "Name too long" error in Write().
@@ -2334,7 +2334,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_WRITE,
0,
- net::ERR_INVALID_HANDLE
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED,
}
},
{ // Direct download with injected "Disk full" error in 2nd Write().
@@ -2347,7 +2347,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadErrorsFile) {
"",
content::TestFileErrorInjector::FILE_OPERATION_WRITE,
1,
- net::ERR_FILE_NO_SPACE
+ content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE,
}
}
};
« no previous file with comments | « no previous file | content/browser/download/download_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698