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

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

Issue 11571025: Initial CL for Downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review. Created 8 years 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
Index: chrome/browser/download/download_item_model_unittest.cc
diff --git a/chrome/browser/download/download_item_model_unittest.cc b/chrome/browser/download/download_item_model_unittest.cc
index 123fe7283db2268b1d6ce20e6ef51083da6e3d16..4efac7a4b5340798f9c3d1acf3107dfc09d798c8 100644
--- a/chrome/browser/download/download_item_model_unittest.cc
+++ b/chrome/browser/download/download_item_model_unittest.cc
@@ -66,6 +66,7 @@ class DownloadItemModelTest : public testing::Test {
ON_CALL(item_, GetReceivedBytes()).WillByDefault(Return(1));
ON_CALL(item_, GetTotalBytes()).WillByDefault(Return(2));
ON_CALL(item_, IsInProgress()).WillByDefault(Return(true));
+ ON_CALL(item_, CanResumeInterrupted()).WillByDefault(Return(false));
ON_CALL(item_, TimeRemaining(_)).WillByDefault(Return(false));
ON_CALL(item_, GetMimeType()).WillByDefault(Return("text/html"));
ON_CALL(item_, AllDataSaved()).WillByDefault(Return(false));
@@ -140,6 +141,8 @@ TEST_F(DownloadItemModelTest, InterruptedStatus) {
"Failed - Blocked" },
{ content::DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED,
"Failed - Virus scan failed" },
+ { content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT,
+ "Failed - File truncated" },
{ content::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
"Failed - System busy" },
{ content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,
@@ -208,6 +211,8 @@ TEST_F(DownloadItemModelTest, InterruptTooltip) {
"foo.bar\nBlocked" },
{ content::DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED,
"foo.bar\nVirus scan failed" },
+ { content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT,
+ "foo.bar\nFile truncated" },
{ content::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
"foo.bar\nSystem busy" },
{ content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED,

Powered by Google App Engine
This is Rietveld 408576698