| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/download/download_item_model.h" | 5 #include "chrome/browser/download/download_item_model.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 { content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, | 138 { content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, |
| 139 "1/2 B Insufficient Permissions" }, | 139 "1/2 B Insufficient Permissions" }, |
| 140 { content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, | 140 { content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, |
| 141 "1/2 B Disk Full" }, | 141 "1/2 B Disk Full" }, |
| 142 { content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, | 142 { content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, |
| 143 "1/2 B Path Too Long" }, | 143 "1/2 B Path Too Long" }, |
| 144 { content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, | 144 { content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, |
| 145 "1/2 B File Too Large" }, | 145 "1/2 B File Too Large" }, |
| 146 { content::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, | 146 { content::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, |
| 147 "1/2 B Virus Detected" }, | 147 "1/2 B Virus Detected" }, |
| 148 { content::DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED, |
| 149 "1/2 B Blocked" }, |
| 150 { content::DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED, |
| 151 "1/2 B Virus Scan Failed" }, |
| 148 { content::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, | 152 { content::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, |
| 149 "1/2 B System Busy" }, | 153 "1/2 B System Busy" }, |
| 150 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, | 154 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, |
| 151 "1/2 B Network Error" }, | 155 "1/2 B Network Error" }, |
| 152 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, | 156 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, |
| 153 "1/2 B Network Timeout" }, | 157 "1/2 B Network Timeout" }, |
| 154 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, | 158 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, |
| 155 "1/2 B Network Disconnected" }, | 159 "1/2 B Network Disconnected" }, |
| 156 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, | 160 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, |
| 157 "1/2 B Server Unavailable" }, | 161 "1/2 B Server Unavailable" }, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 { content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, | 206 { content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, |
| 203 "foo.bar\nInsufficient Permissions" }, | 207 "foo.bar\nInsufficient Permissions" }, |
| 204 { content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, | 208 { content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, |
| 205 "foo.bar\nDisk Full" }, | 209 "foo.bar\nDisk Full" }, |
| 206 { content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, | 210 { content::DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, |
| 207 "foo.bar\nPath Too Long" }, | 211 "foo.bar\nPath Too Long" }, |
| 208 { content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, | 212 { content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, |
| 209 "foo.bar\nFile Too Large" }, | 213 "foo.bar\nFile Too Large" }, |
| 210 { content::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, | 214 { content::DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED, |
| 211 "foo.bar\nVirus Detected" }, | 215 "foo.bar\nVirus Detected" }, |
| 216 { content::DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED, |
| 217 "foo.bar\nBlocked" }, |
| 218 { content::DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED, |
| 219 "foo.bar\nVirus Scan Failed" }, |
| 212 { content::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, | 220 { content::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, |
| 213 "foo.bar\nSystem Busy" }, | 221 "foo.bar\nSystem Busy" }, |
| 214 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, | 222 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, |
| 215 "foo.bar\nNetwork Error" }, | 223 "foo.bar\nNetwork Error" }, |
| 216 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, | 224 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, |
| 217 "foo.bar\nNetwork Timeout" }, | 225 "foo.bar\nNetwork Timeout" }, |
| 218 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, | 226 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, |
| 219 "foo.bar\nNetwork Disconnected" }, | 227 "foo.bar\nNetwork Disconnected" }, |
| 220 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, | 228 { content::DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, |
| 221 "foo.bar\nServer Unavailable" }, | 229 "foo.bar\nServer Unavailable" }, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 Return(test_case.time_remaining_known))); | 375 Return(test_case.time_remaining_known))); |
| 368 EXPECT_CALL(item(), GetOpenWhenComplete()) | 376 EXPECT_CALL(item(), GetOpenWhenComplete()) |
| 369 .WillRepeatedly(Return(test_case.open_when_complete)); | 377 .WillRepeatedly(Return(test_case.open_when_complete)); |
| 370 EXPECT_CALL(item(), IsPaused()) | 378 EXPECT_CALL(item(), IsPaused()) |
| 371 .WillRepeatedly(Return(test_case.is_paused)); | 379 .WillRepeatedly(Return(test_case.is_paused)); |
| 372 | 380 |
| 373 EXPECT_STREQ(test_case.expected_status, | 381 EXPECT_STREQ(test_case.expected_status, |
| 374 UTF16ToUTF8(model().GetStatusText()).c_str()); | 382 UTF16ToUTF8(model().GetStatusText()).c_str()); |
| 375 } | 383 } |
| 376 } | 384 } |
| OLD | NEW |