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 322e722825ba18ceca470f6a09396e8e44669141..188e8e0961572f127489fd653f54a878978ff58d 100644 |
--- a/chrome/browser/download/download_item_model_unittest.cc |
+++ b/chrome/browser/download/download_item_model_unittest.cc |
@@ -124,56 +124,52 @@ TEST_F(DownloadItemModelTest, InterruptedStatus) { |
// Expected status string. This will include the progress as well. |
const char* expected_status; |
} kTestCases[] = { |
- { content::DOWNLOAD_INTERRUPT_REASON_NONE, |
- "1/2 B" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, |
- "Failed - Download error" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, |
- "Failed - Insufficient permissions" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, |
- "Failed - Disk full" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, |
- "Failed - Path too long" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, |
- "Failed - File too large" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, |
- "Failed - Virus detected" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED, |
- "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, |
- "Failed - Network error" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, |
- "Failed - Network timeout" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, |
- "Failed - Network disconnected" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, |
- "Failed - Server unavailable" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST, |
- "Failed - Network error" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, |
- "Failed - Server problem" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE, |
- "Failed - Download error" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT, |
- "Failed - No file" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED, |
- "Failed - Needs authorization" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM, |
- "Failed - Bad certificate" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN, |
- "Failed - Forbidden" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED, |
- "Canceled" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN, |
- "Failed - Shutdown" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_CRASH, |
- "Failed - Crash" }, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NONE, "1/2 B"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, |
+ "Failed - Download error"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, |
+ "Failed - Insufficient permissions"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, "Failed - Disk full"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, |
+ "Failed - Path too long"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, |
+ "Failed - File too large"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, |
+ "Failed - Virus detected"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED, "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, |
+ "Failed - Network error"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, |
+ "Failed - Network timeout"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, |
+ "Failed - Network disconnected"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, |
+ "Failed - Server unavailable"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST, |
+ "Failed - Network error"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, |
+ "Failed - Server problem"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE, |
+ "Failed - Download error"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT, |
+ "Failed - No file"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED, |
+ "Failed - Needs authorization"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM, |
+ "Failed - Bad certificate"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN, |
+ "Failed - Forbidden"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE, |
+ "Failed - Server unreachable"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED, "Canceled"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN, "Failed - Shutdown"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_CRASH, "Failed - Crash"}, |
}; |
static_assert(kInterruptReasonCount == arraysize(kTestCases), |
"interrupt reason mismatch"); |
@@ -200,56 +196,52 @@ TEST_F(DownloadItemModelTest, InterruptTooltip) { |
// interrupt reason. The returned string contains a newline. |
const char* expected_tooltip; |
} kTestCases[] = { |
- { content::DOWNLOAD_INTERRUPT_REASON_NONE, |
- "foo.bar" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, |
- "foo.bar\nDownload error" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, |
- "foo.bar\nInsufficient permissions" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, |
- "foo.bar\nDisk full" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, |
- "foo.bar\nPath too long" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, |
- "foo.bar\nFile too large" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, |
- "foo.bar\nVirus detected" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED, |
- "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, |
- "foo.bar\nNetwork error" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, |
- "foo.bar\nNetwork timeout" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, |
- "foo.bar\nNetwork disconnected" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, |
- "foo.bar\nServer unavailable" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST, |
- "foo.bar\nNetwork error" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, |
- "foo.bar\nServer problem" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE, |
- "foo.bar\nDownload error" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT, |
- "foo.bar\nNo file" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED, |
- "foo.bar\nNeeds authorization" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM, |
- "foo.bar\nBad certificate" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN, |
- "foo.bar\nForbidden" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED, |
- "foo.bar" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN, |
- "foo.bar\nShutdown" }, |
- { content::DOWNLOAD_INTERRUPT_REASON_CRASH, |
- "foo.bar\nCrash" }, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NONE, "foo.bar"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, |
+ "foo.bar\nDownload error"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, |
+ "foo.bar\nInsufficient permissions"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, "foo.bar\nDisk full"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, |
+ "foo.bar\nPath too long"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, |
+ "foo.bar\nFile too large"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, |
+ "foo.bar\nVirus detected"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED, "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, |
+ "foo.bar\nNetwork error"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, |
+ "foo.bar\nNetwork timeout"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, |
+ "foo.bar\nNetwork disconnected"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, |
+ "foo.bar\nServer unavailable"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST, |
+ "foo.bar\nNetwork error"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, |
+ "foo.bar\nServer problem"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE, |
+ "foo.bar\nDownload error"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT, |
+ "foo.bar\nNo file"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED, |
+ "foo.bar\nNeeds authorization"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM, |
+ "foo.bar\nBad certificate"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN, |
+ "foo.bar\nForbidden"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE, |
+ "foo.bar\nServer unreachable"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED, "foo.bar"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN, "foo.bar\nShutdown"}, |
+ {content::DOWNLOAD_INTERRUPT_REASON_CRASH, "foo.bar\nCrash"}, |
}; |
static_assert(kInterruptReasonCount == arraysize(kTestCases), |
"interrupt reason mismatch"); |