Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: chrome/browser/sync/glue/sync_backend_registrar_unittest.cc

Issue 65813002: mac: Prepare most test code for -Wunused-functions too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698