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

Side by Side Diff: sync/internal_api/attachments/attachment_downloader_impl_unittest.cc

Issue 436373002: Move non-API code out of sync/api/attachments/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply CR feedback. Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "sync/api/attachments/attachment_downloader.h" 5 #include "sync/internal_api/public/attachments/attachment_downloader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 #include "google_apis/gaia/fake_oauth2_token_service.h" 12 #include "google_apis/gaia/fake_oauth2_token_service.h"
13 #include "google_apis/gaia/gaia_constants.h" 13 #include "google_apis/gaia/gaia_constants.h"
14 #include "net/url_request/test_url_fetcher_factory.h" 14 #include "net/url_request/test_url_fetcher_factory.h"
15 #include "net/url_request/url_request_test_util.h" 15 #include "net/url_request/url_request_test_util.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 GoogleServiceAuthError::AuthErrorNone()); 348 GoogleServiceAuthError::AuthErrorNone());
349 RunMessageLoop(); 349 RunMessageLoop();
350 // Fail URLFetcher. This should trigger download failure. Access token 350 // Fail URLFetcher. This should trigger download failure. Access token
351 // shouldn't be invalidated. 351 // shouldn't be invalidated.
352 CompleteDownload(net::HTTP_SERVICE_UNAVAILABLE); 352 CompleteDownload(net::HTTP_SERVICE_UNAVAILABLE);
353 EXPECT_EQ(0, token_service()->num_invalidate_token()); 353 EXPECT_EQ(0, token_service()->num_invalidate_token());
354 VerifyDownloadResult(id1, AttachmentDownloader::DOWNLOAD_UNSPECIFIED_ERROR); 354 VerifyDownloadResult(id1, AttachmentDownloader::DOWNLOAD_UNSPECIFIED_ERROR);
355 } 355 }
356 356
357 } // namespace syncer 357 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/attachments/attachment_downloader.cc ('k') | sync/internal_api/attachments/attachment_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698