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/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/task.h" | 14 #include "base/task.h" |
15 #include "chrome/browser/net/gaia/token_service.h" | 15 #include "chrome/browser/net/gaia/token_service.h" |
16 #include "chrome/browser/sync/internal_api/change_record.h" | 16 #include "chrome/browser/sync/internal_api/change_record.h" |
17 #include "chrome/browser/sync/profile_sync_factory_mock.h" | 17 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" |
18 #include "chrome/browser/sync/syncable/model_type.h" | 18 #include "chrome/browser/sync/syncable/model_type.h" |
19 #include "content/test/test_browser_thread.h" | 19 #include "content/test/test_browser_thread.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
22 class ProfileSyncService; | 22 class ProfileSyncService; |
23 class TestProfileSyncService; | 23 class TestProfileSyncService; |
24 | 24 |
25 namespace browser_sync { | 25 namespace browser_sync { |
26 class TestIdFactory; | 26 class TestIdFactory; |
27 } // namespace browser_sync | 27 } // namespace browser_sync |
(...skipping 29 matching lines...) Expand all Loading... |
57 | 57 |
58 virtual void TearDown() OVERRIDE; | 58 virtual void TearDown() OVERRIDE; |
59 | 59 |
60 bool CreateRoot(syncable::ModelType model_type); | 60 bool CreateRoot(syncable::ModelType model_type); |
61 | 61 |
62 protected: | 62 protected: |
63 MessageLoopForUI ui_loop_; | 63 MessageLoopForUI ui_loop_; |
64 content::TestBrowserThread ui_thread_; | 64 content::TestBrowserThread ui_thread_; |
65 content::TestBrowserThread db_thread_; | 65 content::TestBrowserThread db_thread_; |
66 content::TestBrowserThread io_thread_; | 66 content::TestBrowserThread io_thread_; |
67 ProfileSyncFactoryMock factory_; | 67 ProfileSyncComponentsFactoryMock factory_; |
68 scoped_ptr<TokenService> token_service_; | 68 scoped_ptr<TokenService> token_service_; |
69 scoped_ptr<TestProfileSyncService> service_; | 69 scoped_ptr<TestProfileSyncService> service_; |
70 }; | 70 }; |
71 | 71 |
72 class CreateRootTask : public Task { | 72 class CreateRootTask : public Task { |
73 public: | 73 public: |
74 CreateRootTask(AbstractProfileSyncServiceTest* test, | 74 CreateRootTask(AbstractProfileSyncServiceTest* test, |
75 syncable::ModelType model_type); | 75 syncable::ModelType model_type); |
76 | 76 |
77 virtual ~CreateRootTask(); | 77 virtual ~CreateRootTask(); |
78 virtual void Run() OVERRIDE; | 78 virtual void Run() OVERRIDE; |
79 | 79 |
80 bool success(); | 80 bool success(); |
81 | 81 |
82 private: | 82 private: |
83 AbstractProfileSyncServiceTest* test_; | 83 AbstractProfileSyncServiceTest* test_; |
84 syncable::ModelType model_type_; | 84 syncable::ModelType model_type_; |
85 bool success_; | 85 bool success_; |
86 }; | 86 }; |
87 | 87 |
88 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ | 88 #endif // CHROME_BROWSER_SYNC_ABSTRACT_PROFILE_SYNC_SERVICE_TEST_H_ |
OLD | NEW |