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

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

Issue 3305003: New authorization framework for sync. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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
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 // Syncer unit tests. Unfortunately a lot of these tests 5 // Syncer unit tests. Unfortunately a lot of these tests
6 // are outdated and need to be reworked and updated. 6 // are outdated and need to be reworked and updated.
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } while (should_loop); 161 } while (should_loop);
162 } 162 }
163 163
164 virtual void SetUp() { 164 virtual void SetUp() {
165 syncdb_.SetUp(); 165 syncdb_.SetUp();
166 166
167 mock_server_.reset( 167 mock_server_.reset(
168 new MockConnectionManager(syncdb_.manager(), syncdb_.name())); 168 new MockConnectionManager(syncdb_.manager(), syncdb_.name()));
169 EnableDatatype(syncable::BOOKMARKS); 169 EnableDatatype(syncable::BOOKMARKS);
170 worker_ = new ModelSafeWorker(); 170 worker_ = new ModelSafeWorker();
171 context_.reset(new SyncSessionContext(mock_server_.get(), NULL, 171 context_.reset(new SyncSessionContext(mock_server_.get(),
172 syncdb_.manager(), this)); 172 syncdb_.manager(), this));
173 context_->set_account_name(syncdb_.name()); 173 context_->set_account_name(syncdb_.name());
174 ASSERT_FALSE(context_->syncer_event_channel()); 174 ASSERT_FALSE(context_->syncer_event_channel());
175 ASSERT_FALSE(context_->resolver()); 175 ASSERT_FALSE(context_->resolver());
176 syncer_ = new Syncer(context_.get()); 176 syncer_ = new Syncer(context_.get());
177 // The Syncer installs some components on the context. 177 // The Syncer installs some components on the context.
178 ASSERT_TRUE(context_->syncer_event_channel()); 178 ASSERT_TRUE(context_->syncer_event_channel());
179 ASSERT_TRUE(context_->resolver()); 179 ASSERT_TRUE(context_->resolver());
180 180
181 hookup_.reset(context_->syncer_event_channel()->AddObserver(this)); 181 hookup_.reset(context_->syncer_event_channel()->AddObserver(this));
(...skipping 4979 matching lines...) Expand 10 before | Expand all | Expand 10 after
5161 Add(low_id_); 5161 Add(low_id_);
5162 Add(high_id_); 5162 Add(high_id_);
5163 syncer_->SyncShare(this); 5163 syncer_->SyncShare(this);
5164 ExpectLocalOrderIsByServerId(); 5164 ExpectLocalOrderIsByServerId();
5165 } 5165 }
5166 5166
5167 const SyncerTest::CommitOrderingTest 5167 const SyncerTest::CommitOrderingTest
5168 SyncerTest::CommitOrderingTest::LAST_COMMIT_ITEM = {-1, TestIdFactory::root()}; 5168 SyncerTest::CommitOrderingTest::LAST_COMMIT_ITEM = {-1, TestIdFactory::root()};
5169 5169
5170 } // namespace browser_sync 5170 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698