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

Side by Side Diff: components/sync_driver/generic_change_processor_unittest.cc

Issue 2148293004: [Sync] //components/sync external changes [DO NOT SUBMIT] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sc-1
Patch Set: Rebase. Created 4 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
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 "components/sync_driver/generic_change_processor.h" 5 #include "components/sync_driver/generic_change_processor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "components/sync/api/attachments/attachment_id.h"
18 #include "components/sync/api/attachments/attachment_store.h"
19 #include "components/sync/api/fake_syncable_service.h"
20 #include "components/sync/api/sync_change.h"
21 #include "components/sync/api/sync_merge_result.h"
22 #include "components/sync/base/model_type.h"
23 #include "components/sync/core/attachments/attachment_service_impl.h"
24 #include "components/sync/core/attachments/fake_attachment_downloader.h"
25 #include "components/sync/core/attachments/fake_attachment_uploader.h"
26 #include "components/sync/core/read_node.h"
27 #include "components/sync/core/read_transaction.h"
28 #include "components/sync/core/sync_encryption_handler.h"
29 #include "components/sync/core/test/data_type_error_handler_mock.h"
30 #include "components/sync/core/test/test_user_share.h"
31 #include "components/sync/core/user_share.h"
32 #include "components/sync/core/write_node.h"
33 #include "components/sync/core/write_transaction.h"
17 #include "components/sync_driver/fake_sync_client.h" 34 #include "components/sync_driver/fake_sync_client.h"
18 #include "components/sync_driver/local_device_info_provider.h" 35 #include "components/sync_driver/local_device_info_provider.h"
19 #include "components/sync_driver/sync_api_component_factory.h" 36 #include "components/sync_driver/sync_api_component_factory.h"
20 #include "sync/api/attachments/attachment_id.h"
21 #include "sync/api/attachments/attachment_store.h"
22 #include "sync/api/fake_syncable_service.h"
23 #include "sync/api/sync_change.h"
24 #include "sync/api/sync_merge_result.h"
25 #include "sync/internal_api/public/attachments/attachment_service_impl.h"
26 #include "sync/internal_api/public/attachments/fake_attachment_downloader.h"
27 #include "sync/internal_api/public/attachments/fake_attachment_uploader.h"
28 #include "sync/internal_api/public/base/model_type.h"
29 #include "sync/internal_api/public/read_node.h"
30 #include "sync/internal_api/public/read_transaction.h"
31 #include "sync/internal_api/public/sync_encryption_handler.h"
32 #include "sync/internal_api/public/test/data_type_error_handler_mock.h"
33 #include "sync/internal_api/public/test/test_user_share.h"
34 #include "sync/internal_api/public/user_share.h"
35 #include "sync/internal_api/public/write_node.h"
36 #include "sync/internal_api/public/write_transaction.h"
37 #include "testing/gmock/include/gmock/gmock.h" 37 #include "testing/gmock/include/gmock/gmock.h"
38 #include "testing/gtest/include/gtest/gtest.h" 38 #include "testing/gtest/include/gtest/gtest.h"
39 39
40 namespace sync_driver { 40 namespace sync_driver {
41 41
42 namespace { 42 namespace {
43 43
44 // A mock that keeps track of attachments passed to UploadAttachments. 44 // A mock that keeps track of attachments passed to UploadAttachments.
45 class MockAttachmentService : public syncer::AttachmentServiceImpl { 45 class MockAttachmentService : public syncer::AttachmentServiceImpl {
46 public: 46 public:
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 change_processor()->GetAllSyncData(syncer::SESSIONS); 540 change_processor()->GetAllSyncData(syncer::SESSIONS);
541 ASSERT_EQ(sync_data.size(), 1U); 541 ASSERT_EQ(sync_data.size(), 1U);
542 ASSERT_EQ("session tag 2", 542 ASSERT_EQ("session tag 2",
543 sync_data[0].GetSpecifics().session().session_tag()); 543 sync_data[0].GetSpecifics().session().session_tag());
544 EXPECT_FALSE(syncer::SyncDataRemote(sync_data[0]).GetClientTagHash().empty()); 544 EXPECT_FALSE(syncer::SyncDataRemote(sync_data[0]).GetClientTagHash().empty());
545 } 545 }
546 546
547 } // namespace 547 } // namespace
548 548
549 } // namespace sync_driver 549 } // namespace sync_driver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698