| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/task.h" | 13 #include "base/task.h" |
| 14 #include "chrome/browser/net/gaia/token_service.h" | 14 #include "chrome/browser/net/gaia/token_service.h" |
| 15 #include "chrome/browser/sync/profile_sync_factory_mock.h" | 15 #include "chrome/browser/sync/profile_sync_factory_mock.h" |
| 16 #include "chrome/browser/sync/syncable/model_type.h" | 16 #include "chrome/browser/sync/syncable/model_type.h" |
| 17 #include "chrome/test/base/testing_browser_process_test.h" | |
| 18 #include "content/browser/browser_thread.h" | 17 #include "content/browser/browser_thread.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 19 |
| 21 class ProfileSyncService; | 20 class ProfileSyncService; |
| 22 class TestProfileSyncService; | 21 class TestProfileSyncService; |
| 23 | 22 |
| 24 namespace browser_sync { | 23 namespace browser_sync { |
| 25 class TestIdFactory; | 24 class TestIdFactory; |
| 26 } // namespace browser_sync | 25 } // namespace browser_sync |
| 27 | 26 |
| 28 namespace sync_api { | 27 namespace sync_api { |
| 29 struct UserShare; | 28 struct UserShare; |
| 30 } // namespace sync_api | 29 } // namespace sync_api |
| 31 | 30 |
| 32 class ProfileSyncServiceTestHelper { | 31 class ProfileSyncServiceTestHelper { |
| 33 public: | 32 public: |
| 34 static const std::string GetTagForType(syncable::ModelType model_type); | 33 static const std::string GetTagForType(syncable::ModelType model_type); |
| 35 | 34 |
| 36 static bool CreateRoot(syncable::ModelType model_type, | 35 static bool CreateRoot(syncable::ModelType model_type, |
| 37 sync_api::UserShare* service, | 36 sync_api::UserShare* service, |
| 38 browser_sync::TestIdFactory* ids); | 37 browser_sync::TestIdFactory* ids); |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 class AbstractProfileSyncServiceTest : public TestingBrowserProcessTest { | 40 class AbstractProfileSyncServiceTest : public testing::Test { |
| 42 public: | 41 public: |
| 43 AbstractProfileSyncServiceTest(); | 42 AbstractProfileSyncServiceTest(); |
| 44 virtual ~AbstractProfileSyncServiceTest(); | 43 virtual ~AbstractProfileSyncServiceTest(); |
| 45 | 44 |
| 46 virtual void SetUp(); | 45 virtual void SetUp(); |
| 47 | 46 |
| 48 virtual void TearDown(); | 47 virtual void TearDown(); |
| 49 | 48 |
| 50 bool CreateRoot(syncable::ModelType model_type); | 49 bool CreateRoot(syncable::ModelType model_type); |
| 51 | 50 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 69 | 68 |
| 70 bool success(); | 69 bool success(); |
| 71 | 70 |
| 72 private: | 71 private: |
| 73 AbstractProfileSyncServiceTest* test_; | 72 AbstractProfileSyncServiceTest* test_; |
| 74 syncable::ModelType model_type_; | 73 syncable::ModelType model_type_; |
| 75 bool success_; | 74 bool success_; |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 77 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
| OLD | NEW |