OLD | NEW |
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 Loading... |
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 |
OLD | NEW |