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 #include "chrome/browser/sync/glue/sync_backend_registrar.h" | 5 #include "chrome/browser/sync/glue/sync_backend_registrar.h" |
6 | 6 |
7 #include "chrome/browser/sync/glue/change_processor_mock.h" | 7 #include "chrome/browser/sync/glue/change_processor_mock.h" |
8 #include "chrome/browser/sync/glue/ui_model_worker.h" | 8 #include "chrome/browser/sync/glue/ui_model_worker.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "content/public/test/test_browser_thread.h" | 10 #include "content/public/test/test_browser_thread.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 void ExpectHasProcessorsForTypes(const SyncBackendRegistrar& registrar, | 59 void ExpectHasProcessorsForTypes(const SyncBackendRegistrar& registrar, |
60 ModelTypeSet types) { | 60 ModelTypeSet types) { |
61 for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) { | 61 for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) { |
62 ModelType model_type = ModelTypeFromInt(i); | 62 ModelType model_type = ModelTypeFromInt(i); |
63 EXPECT_EQ(types.Has(model_type), | 63 EXPECT_EQ(types.Has(model_type), |
64 registrar.IsTypeActivatedForTest(model_type)); | 64 registrar.IsTypeActivatedForTest(model_type)); |
65 } | 65 } |
66 } | 66 } |
67 | 67 |
68 MessageLoop loop_; | 68 base::MessageLoop loop_; |
69 syncer::TestUserShare test_user_share_; | 69 syncer::TestUserShare test_user_share_; |
70 | 70 |
71 private: | 71 private: |
72 content::TestBrowserThread ui_thread_; | 72 content::TestBrowserThread ui_thread_; |
73 }; | 73 }; |
74 | 74 |
75 TEST_F(SyncBackendRegistrarTest, ConstructorEmpty) { | 75 TEST_F(SyncBackendRegistrarTest, ConstructorEmpty) { |
76 TestingProfile profile; | 76 TestingProfile profile; |
77 SyncBackendRegistrar registrar("test", &profile, &loop_); | 77 SyncBackendRegistrar registrar("test", &profile, &loop_); |
78 registrar.SetInitialTypes(ModelTypeSet()); | 78 registrar.SetInitialTypes(ModelTypeSet()); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // Should do nothing. | 244 // Should do nothing. |
245 TriggerChanges(®istrar, AUTOFILL); | 245 TriggerChanges(®istrar, AUTOFILL); |
246 | 246 |
247 registrar.OnSyncerShutdownComplete(); | 247 registrar.OnSyncerShutdownComplete(); |
248 registrar.StopOnUIThread(); | 248 registrar.StopOnUIThread(); |
249 } | 249 } |
250 | 250 |
251 } // namespace | 251 } // namespace |
252 | 252 |
253 } // namespace browser_sync | 253 } // namespace browser_sync |
OLD | NEW |