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

Side by Side Diff: chrome/browser/sync/engine/syncapi_unittest.cc

Issue 6621062: Refactor sync notifier out of sync api. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Minox fixes. Created 9 years, 9 months 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
« no previous file with comments | « chrome/browser/sync/engine/syncapi.cc ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Unit tests for the SyncApi. Note that a lot of the underlying 5 // Unit tests for the SyncApi. Note that a lot of the underlying
6 // functionality is provided by the Syncable layer, which has its own 6 // functionality is provided by the Syncable layer, which has its own
7 // unit tests. We'll test SyncApi specific things in this harness. 7 // unit tests. We'll test SyncApi specific things in this harness.
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 class SyncManagerTest : public testing::Test, 624 class SyncManagerTest : public testing::Test,
625 public ModelSafeWorkerRegistrar { 625 public ModelSafeWorkerRegistrar {
626 protected: 626 protected:
627 SyncManagerTest() : ui_thread_(BrowserThread::UI, &ui_loop_) {} 627 SyncManagerTest() : ui_thread_(BrowserThread::UI, &ui_loop_) {}
628 628
629 // Test implementation. 629 // Test implementation.
630 void SetUp() { 630 void SetUp() {
631 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 631 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
632 sync_manager_.Init(temp_dir_.path(), "bogus", 0, false, 632 sync_manager_.Init(temp_dir_.path(), "bogus", 0, false,
633 new TestHttpPostProviderFactory(), this, "bogus", 633 new TestHttpPostProviderFactory(), this, "bogus",
634 SyncCredentials(), notifier::NotifierOptions(), 634 SyncCredentials(), "", true /* setup_for_test_mode */);
635 "", true /* setup_for_test_mode */);
636 sync_manager_.AddObserver(&observer_); 635 sync_manager_.AddObserver(&observer_);
637 ModelSafeRoutingInfo routes; 636 ModelSafeRoutingInfo routes;
638 GetModelSafeRoutingInfo(&routes); 637 GetModelSafeRoutingInfo(&routes);
639 for (ModelSafeRoutingInfo::iterator i = routes.begin(); i != routes.end(); 638 for (ModelSafeRoutingInfo::iterator i = routes.begin(); i != routes.end();
640 ++i) { 639 ++i) {
641 EXPECT_CALL(observer_, OnChangesApplied(i->first, _, _, 1)) 640 EXPECT_CALL(observer_, OnChangesApplied(i->first, _, _, 1))
642 .RetiresOnSaturation(); 641 .RetiresOnSaturation();
643 EXPECT_CALL(observer_, OnChangesComplete(i->first)) 642 EXPECT_CALL(observer_, OnChangesComplete(i->first))
644 .RetiresOnSaturation(); 643 .RetiresOnSaturation();
645 type_roots_[i->first] = MakeServerNodeForType( 644 type_roots_[i->first] = MakeServerNodeForType(
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 true /* is encrypted */)); 1054 true /* is encrypted */));
1056 EXPECT_TRUE(syncable::VerifyDataTypeEncryption(trans.GetWrappedTrans(), 1055 EXPECT_TRUE(syncable::VerifyDataTypeEncryption(trans.GetWrappedTrans(),
1057 syncable::THEMES, 1056 syncable::THEMES,
1058 false /* not encrypted */)); 1057 false /* not encrypted */));
1059 } 1058 }
1060 } 1059 }
1061 1060
1062 } // namespace 1061 } // namespace
1063 1062
1064 } // namespace browser_sync 1063 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncapi.cc ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698