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

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

Issue 792343004: Standardize usage of virtual/override/final specifiers in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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/internal_api/public/attachments/fake_attachment_uploader.h" 5 #include "sync/internal_api/public/attachments/fake_attachment_uploader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "sync/api/attachments/attachment.h" 11 #include "sync/api/attachments/attachment.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace syncer { 14 namespace syncer {
15 15
16 namespace { 16 namespace {
17 17
18 const char kAttachmentData[] = "some data"; 18 const char kAttachmentData[] = "some data";
19 19
20 } // namespace 20 } // namespace
21 21
22 class FakeAttachmentUploaderTest : public testing::Test { 22 class FakeAttachmentUploaderTest : public testing::Test {
23 protected: 23 protected:
24 virtual void SetUp() { 24 void SetUp() override {
25 upload_callback_count = 0; 25 upload_callback_count = 0;
26 upload_callback = base::Bind(&FakeAttachmentUploaderTest::Increment, 26 upload_callback = base::Bind(&FakeAttachmentUploaderTest::Increment,
27 base::Unretained(this), 27 base::Unretained(this),
28 &upload_callback_count); 28 &upload_callback_count);
29 } 29 }
30 base::MessageLoop message_loop; 30 base::MessageLoop message_loop;
31 FakeAttachmentUploader uploader; 31 FakeAttachmentUploader uploader;
32 int upload_callback_count; 32 int upload_callback_count;
33 AttachmentUploader::UploadCallback upload_callback; 33 AttachmentUploader::UploadCallback upload_callback;
34 34
(...skipping 16 matching lines...) Expand all
51 Attachment attachment2 = Attachment::Create(some_data); 51 Attachment attachment2 = Attachment::Create(some_data);
52 Attachment attachment3 = Attachment::Create(some_data); 52 Attachment attachment3 = Attachment::Create(some_data);
53 uploader.UploadAttachment(attachment1, upload_callback); 53 uploader.UploadAttachment(attachment1, upload_callback);
54 uploader.UploadAttachment(attachment2, upload_callback); 54 uploader.UploadAttachment(attachment2, upload_callback);
55 uploader.UploadAttachment(attachment3, upload_callback); 55 uploader.UploadAttachment(attachment3, upload_callback);
56 message_loop.RunUntilIdle(); 56 message_loop.RunUntilIdle();
57 EXPECT_EQ(upload_callback_count, 3); 57 EXPECT_EQ(upload_callback_count, 3);
58 } 58 }
59 59
60 } // namespace syncer 60 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/attachments/fake_attachment_downloader_unittest.cc ('k') | sync/internal_api/http_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698