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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/fake_attachment_downloader_unittest.cc
diff --git a/sync/internal_api/attachments/fake_attachment_downloader_unittest.cc b/sync/internal_api/attachments/fake_attachment_downloader_unittest.cc
deleted file mode 100644
index 1e08e4fb97a0e4807c89fc28de62bd40e1137d83..0000000000000000000000000000000000000000
--- a/sync/internal_api/attachments/fake_attachment_downloader_unittest.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sync/internal_api/public/attachments/fake_attachment_downloader.h"
-
-#include <vector>
-
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "sync/api/attachments/attachment.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace syncer {
-
-class FakeAttachmentDownloaderTest : public testing::Test {
- protected:
- FakeAttachmentDownloaderTest() {}
-
- void SetUp() override {}
-
- void TearDown() override {}
-
- AttachmentDownloader* downloader() {
- return &attachment_downloader_;
- }
-
- AttachmentDownloader::DownloadCallback download_callback() {
- return base::Bind(&FakeAttachmentDownloaderTest::DownloadDone,
- base::Unretained(this));
- }
-
- const std::vector<AttachmentDownloader::DownloadResult>& download_results() {
- return download_results_;
- }
-
- void RunMessageLoop() {
- base::RunLoop run_loop;
- run_loop.RunUntilIdle();
- }
-
- private:
- void DownloadDone(const AttachmentDownloader::DownloadResult& result,
- std::unique_ptr<Attachment> attachment) {
- download_results_.push_back(result);
- }
-
- base::MessageLoop message_loop_;
- FakeAttachmentDownloader attachment_downloader_;
- std::vector<AttachmentDownloader::DownloadResult> download_results_;
-};
-
-TEST_F(FakeAttachmentDownloaderTest, DownloadAttachment) {
- AttachmentId attachment_id = AttachmentId::Create(0, 0);
- downloader()->DownloadAttachment(attachment_id, download_callback());
- RunMessageLoop();
- EXPECT_EQ(1U, download_results().size());
- EXPECT_EQ(AttachmentDownloader::DOWNLOAD_SUCCESS, download_results()[0]);
-}
-
-} // namespace syncer
« no previous file with comments | « sync/internal_api/attachments/fake_attachment_downloader.cc ('k') | sync/internal_api/attachments/fake_attachment_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698