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

Unified Diff: sync/internal_api/attachments/attachment_downloader_impl_unittest.cc

Issue 554743004: Update AttachmentServiceImpl to retry attachment uploads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master. Created 6 years, 3 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
Index: sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
diff --git a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
index 01b12c17c974040dedd0df5a073d18f0a802a44f..ee57a5bb1b512865e135e0237039a85beafb3eac 100644
--- a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
+++ b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
@@ -319,7 +319,7 @@ TEST_F(AttachmentDownloaderImplTest, RequestAccessTokenFails) {
GoogleServiceAuthError(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS));
RunMessageLoop();
// Only id2 should fail.
- VerifyDownloadResult(id2, AttachmentDownloader::DOWNLOAD_UNSPECIFIED_ERROR);
+ VerifyDownloadResult(id2, AttachmentDownloader::DOWNLOAD_TRANSIENT_ERROR);
// Complete request for id1.
CompleteDownload(net::HTTP_OK);
VerifyDownloadResult(id1, AttachmentDownloader::DOWNLOAD_SUCCESS);
@@ -337,7 +337,7 @@ TEST_F(AttachmentDownloaderImplTest, URLFetcher_BadToken) {
// invalidation.
CompleteDownload(net::HTTP_UNAUTHORIZED);
EXPECT_EQ(1, token_service()->num_invalidate_token());
- VerifyDownloadResult(id1, AttachmentDownloader::DOWNLOAD_UNSPECIFIED_ERROR);
+ VerifyDownloadResult(id1, AttachmentDownloader::DOWNLOAD_TRANSIENT_ERROR);
}
TEST_F(AttachmentDownloaderImplTest, URLFetcher_ServiceUnavailable) {
@@ -352,7 +352,7 @@ TEST_F(AttachmentDownloaderImplTest, URLFetcher_ServiceUnavailable) {
// shouldn't be invalidated.
CompleteDownload(net::HTTP_SERVICE_UNAVAILABLE);
EXPECT_EQ(0, token_service()->num_invalidate_token());
- VerifyDownloadResult(id1, AttachmentDownloader::DOWNLOAD_UNSPECIFIED_ERROR);
+ VerifyDownloadResult(id1, AttachmentDownloader::DOWNLOAD_TRANSIENT_ERROR);
}
} // namespace syncer
« no previous file with comments | « sync/internal_api/attachments/attachment_downloader_impl.cc ('k') | sync/internal_api/attachments/attachment_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698