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/testing_browser_process_test.h" |
17 #include "content/browser/browser_thread.h" | 18 #include "content/browser/browser_thread.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
19 | 20 |
20 class ProfileSyncService; | 21 class ProfileSyncService; |
21 class TestProfileSyncService; | 22 class TestProfileSyncService; |
22 | 23 |
23 namespace browser_sync { | 24 namespace browser_sync { |
24 class TestIdFactory; | 25 class TestIdFactory; |
25 } // namespace browser_sync | 26 } // namespace browser_sync |
26 | 27 |
27 namespace sync_api { | 28 namespace sync_api { |
28 struct UserShare; | 29 struct UserShare; |
29 } // namespace sync_api | 30 } // namespace sync_api |
30 | 31 |
31 class ProfileSyncServiceTestHelper { | 32 class ProfileSyncServiceTestHelper { |
32 public: | 33 public: |
33 static const std::string GetTagForType(syncable::ModelType model_type); | 34 static const std::string GetTagForType(syncable::ModelType model_type); |
34 | 35 |
35 static bool CreateRoot(syncable::ModelType model_type, | 36 static bool CreateRoot(syncable::ModelType model_type, |
36 sync_api::UserShare* service, | 37 sync_api::UserShare* service, |
37 browser_sync::TestIdFactory* ids); | 38 browser_sync::TestIdFactory* ids); |
38 }; | 39 }; |
39 | 40 |
40 class AbstractProfileSyncServiceTest : public testing::Test { | 41 class AbstractProfileSyncServiceTest : public TestingBrowserProcessTest { |
41 public: | 42 public: |
42 AbstractProfileSyncServiceTest(); | 43 AbstractProfileSyncServiceTest(); |
43 virtual ~AbstractProfileSyncServiceTest(); | 44 virtual ~AbstractProfileSyncServiceTest(); |
44 | 45 |
45 virtual void SetUp(); | 46 virtual void SetUp(); |
46 | 47 |
47 virtual void TearDown(); | 48 virtual void TearDown(); |
48 | 49 |
49 bool CreateRoot(syncable::ModelType model_type); | 50 bool CreateRoot(syncable::ModelType model_type); |
50 | 51 |
(...skipping 17 matching lines...) Expand all Loading... |
68 | 69 |
69 bool success(); | 70 bool success(); |
70 | 71 |
71 private: | 72 private: |
72 AbstractProfileSyncServiceTest* test_; | 73 AbstractProfileSyncServiceTest* test_; |
73 syncable::ModelType model_type_; | 74 syncable::ModelType model_type_; |
74 bool success_; | 75 bool success_; |
75 }; | 76 }; |
76 | 77 |
77 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 78 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
OLD | NEW |