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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 TriggerChanges(registrar_.get(), BOOKMARKS); | 219 TriggerChanges(registrar_.get(), BOOKMARKS); |
220 | 220 |
221 registrar_->DeactivateDataType(BOOKMARKS); | 221 registrar_->DeactivateDataType(BOOKMARKS); |
222 ExpectRoutingInfo(registrar_.get(), syncer::ModelSafeRoutingInfo()); | 222 ExpectRoutingInfo(registrar_.get(), syncer::ModelSafeRoutingInfo()); |
223 ExpectHasProcessorsForTypes(*registrar_, ModelTypeSet()); | 223 ExpectHasProcessorsForTypes(*registrar_, ModelTypeSet()); |
224 | 224 |
225 // Should do nothing. | 225 // Should do nothing. |
226 TriggerChanges(registrar_.get(), BOOKMARKS); | 226 TriggerChanges(registrar_.get(), BOOKMARKS); |
227 } | 227 } |
228 | 228 |
229 void ActiviateDoneOnDb(base::WaitableEvent* done) { | |
230 done->Signal(); | |
231 } | |
232 | |
233 TEST_F(SyncBackendRegistrarTest, ActivateDeactivateNonUIDataType) { | 229 TEST_F(SyncBackendRegistrarTest, ActivateDeactivateNonUIDataType) { |
234 InSequence in_sequence; | 230 InSequence in_sequence; |
235 registrar_->SetInitialTypes(ModelTypeSet()); | 231 registrar_->SetInitialTypes(ModelTypeSet()); |
236 | 232 |
237 // Should do nothing. | 233 // Should do nothing. |
238 TriggerChanges(registrar_.get(), AUTOFILL); | 234 TriggerChanges(registrar_.get(), AUTOFILL); |
239 | 235 |
240 StrictMock<ChangeProcessorMock> change_processor_mock; | 236 StrictMock<ChangeProcessorMock> change_processor_mock; |
241 EXPECT_CALL(change_processor_mock, StartImpl(&profile_)); | 237 EXPECT_CALL(change_processor_mock, StartImpl(&profile_)); |
242 EXPECT_CALL(change_processor_mock, IsRunning()) | 238 EXPECT_CALL(change_processor_mock, IsRunning()) |
(...skipping 23 matching lines...) Expand all Loading... |
266 ExpectRoutingInfo(registrar_.get(), syncer::ModelSafeRoutingInfo()); | 262 ExpectRoutingInfo(registrar_.get(), syncer::ModelSafeRoutingInfo()); |
267 ExpectHasProcessorsForTypes(*registrar_, ModelTypeSet()); | 263 ExpectHasProcessorsForTypes(*registrar_, ModelTypeSet()); |
268 | 264 |
269 // Should do nothing. | 265 // Should do nothing. |
270 TriggerChanges(registrar_.get(), AUTOFILL); | 266 TriggerChanges(registrar_.get(), AUTOFILL); |
271 } | 267 } |
272 | 268 |
273 } // namespace | 269 } // namespace |
274 | 270 |
275 } // namespace browser_sync | 271 } // namespace browser_sync |
OLD | NEW |