| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
| 6 #define CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 6 #define CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "base/callback.h" | 12 #include "base/callback.h" |
| 11 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 14 #include "components/sync_driver/sync_api_component_factory_mock.h" | 16 #include "components/sync_driver/sync_api_component_factory_mock.h" |
| 15 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
| 16 #include "sync/internal_api/public/base/model_type.h" | 18 #include "sync/internal_api/public/base/model_type.h" |
| 17 #include "sync/internal_api/public/change_record.h" | 19 #include "sync/internal_api/public/change_record.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 21 |
| 20 class ProfileSyncService; | 22 class ProfileSyncService; |
| 21 class TestProfileSyncService; | 23 class TestProfileSyncService; |
| 22 | 24 |
| 23 namespace syncer { | 25 namespace syncer { |
| 24 struct UserShare; | 26 struct UserShare; |
| 25 } // namespace syncer | 27 } // namespace syncer |
| 26 | 28 |
| 27 class ProfileSyncServiceTestHelper { | 29 class ProfileSyncServiceTestHelper { |
| 28 public: | 30 public: |
| 29 static syncer::ImmutableChangeRecordList MakeSingletonChangeRecordList( | 31 static syncer::ImmutableChangeRecordList MakeSingletonChangeRecordList( |
| 30 int64 node_id, syncer::ChangeRecord::Action action); | 32 int64_t node_id, |
| 33 syncer::ChangeRecord::Action action); |
| 31 | 34 |
| 32 // Deletions must provide an EntitySpecifics for the deleted data. | 35 // Deletions must provide an EntitySpecifics for the deleted data. |
| 33 static syncer::ImmutableChangeRecordList | 36 static syncer::ImmutableChangeRecordList |
| 34 MakeSingletonDeletionChangeRecordList( | 37 MakeSingletonDeletionChangeRecordList( |
| 35 int64 node_id, | 38 int64_t node_id, |
| 36 const sync_pb::EntitySpecifics& specifics); | 39 const sync_pb::EntitySpecifics& specifics); |
| 37 }; | 40 }; |
| 38 | 41 |
| 39 class AbstractProfileSyncServiceTest : public testing::Test { | 42 class AbstractProfileSyncServiceTest : public testing::Test { |
| 40 public: | 43 public: |
| 41 AbstractProfileSyncServiceTest(); | 44 AbstractProfileSyncServiceTest(); |
| 42 ~AbstractProfileSyncServiceTest() override; | 45 ~AbstractProfileSyncServiceTest() override; |
| 43 | 46 |
| 44 void SetUp() override; | 47 void SetUp() override; |
| 45 | 48 |
| 46 void TearDown() override; | 49 void TearDown() override; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 64 private: | 67 private: |
| 65 void CreateRootCallback(); | 68 void CreateRootCallback(); |
| 66 | 69 |
| 67 base::Closure callback_; | 70 base::Closure callback_; |
| 68 AbstractProfileSyncServiceTest* test_; | 71 AbstractProfileSyncServiceTest* test_; |
| 69 syncer::ModelType model_type_; | 72 syncer::ModelType model_type_; |
| 70 bool success_; | 73 bool success_; |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 76 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
| OLD | NEW |