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

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

Issue 7822008: [Sync] Remove static initializers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 9 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
« no previous file with comments | « chrome/browser/sync/engine/syncer.cc ('k') | chrome/browser/sync/engine/syncer_util.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 8 #include <algorithm>
9 #include <limits> 9 #include <limits>
10 #include <list> 10 #include <list>
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 EXPECT_TRUE(entry.good()); 428 EXPECT_TRUE(entry.good());
429 if (!entry.good()) { 429 if (!entry.good()) {
430 return default_value; 430 return default_value;
431 } 431 }
432 EXPECT_EQ(metahandle, entry.Get(META_HANDLE)); 432 EXPECT_EQ(metahandle, entry.Get(META_HANDLE));
433 return entry.Get(field); 433 return entry.Get(field);
434 } 434 }
435 435
436 // Helper getters that work without a transaction, to reduce boilerplate. 436 // Helper getters that work without a transaction, to reduce boilerplate.
437 Id Get(int64 metahandle, syncable::IdField field) const { 437 Id Get(int64 metahandle, syncable::IdField field) const {
438 return GetField(metahandle, field, syncable::kNullId); 438 return GetField(metahandle, field, syncable::GetNullId());
439 } 439 }
440 440
441 string Get(int64 metahandle, syncable::StringField field) const { 441 string Get(int64 metahandle, syncable::StringField field) const {
442 return GetField(metahandle, field, string()); 442 return GetField(metahandle, field, string());
443 } 443 }
444 444
445 int64 Get(int64 metahandle, syncable::Int64Field field) const { 445 int64 Get(int64 metahandle, syncable::Int64Field field) const {
446 return GetField(metahandle, field, syncable::kInvalidMetaHandle); 446 return GetField(metahandle, field, syncable::kInvalidMetaHandle);
447 } 447 }
448 448
(...skipping 4791 matching lines...) Expand 10 before | Expand all | Expand 10 after
5240 Add(low_id_); 5240 Add(low_id_);
5241 Add(high_id_); 5241 Add(high_id_);
5242 SyncShareAsDelegate(); 5242 SyncShareAsDelegate();
5243 ExpectLocalOrderIsByServerId(); 5243 ExpectLocalOrderIsByServerId();
5244 } 5244 }
5245 5245
5246 const SyncerTest::CommitOrderingTest 5246 const SyncerTest::CommitOrderingTest
5247 SyncerTest::CommitOrderingTest::LAST_COMMIT_ITEM = {-1, TestIdFactory::root()}; 5247 SyncerTest::CommitOrderingTest::LAST_COMMIT_ITEM = {-1, TestIdFactory::root()};
5248 5248
5249 } // namespace browser_sync 5249 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer.cc ('k') | chrome/browser/sync/engine/syncer_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698