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

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

Issue 8851004: [Sync] Replace all instances of ModelTypeBitSet with ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 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 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2150 SyncShareAsDelegate(); 2150 SyncShareAsDelegate();
2151 { 2151 {
2152 ReadTransaction trans(FROM_HERE, dir); 2152 ReadTransaction trans(FROM_HERE, dir);
2153 Entry entry(&trans, syncable::GET_BY_ID, id); 2153 Entry entry(&trans, syncable::GET_BY_ID, id);
2154 ASSERT_TRUE(entry.good()); 2154 ASSERT_TRUE(entry.good());
2155 EXPECT_TRUE(entry.Get(MTIME) == test_time); 2155 EXPECT_TRUE(entry.Get(MTIME) == test_time);
2156 } 2156 }
2157 } 2157 }
2158 2158
2159 TEST_F(SyncerTest, ParentAndChildBothMatch) { 2159 TEST_F(SyncerTest, ParentAndChildBothMatch) {
2160 syncable::ModelTypeBitSet all_types; 2160 const syncable::FullModelEnumSet all_types =
2161 all_types.set(); 2161 syncable::FullModelEnumSet::All();
2162 ScopedDirLookup dir(syncdb_.manager(), syncdb_.name()); 2162 ScopedDirLookup dir(syncdb_.manager(), syncdb_.name());
2163 CHECK(dir.good()); 2163 CHECK(dir.good());
2164 syncable::Id parent_id = ids_.NewServerId(); 2164 syncable::Id parent_id = ids_.NewServerId();
2165 syncable::Id child_id = ids_.NewServerId(); 2165 syncable::Id child_id = ids_.NewServerId();
2166 2166
2167 { 2167 {
2168 WriteTransaction wtrans(FROM_HERE, UNITTEST, dir); 2168 WriteTransaction wtrans(FROM_HERE, UNITTEST, dir);
2169 MutableEntry parent(&wtrans, CREATE, root_id_, "Folder"); 2169 MutableEntry parent(&wtrans, CREATE, root_id_, "Folder");
2170 ASSERT_TRUE(parent.good()); 2170 ASSERT_TRUE(parent.good());
2171 parent.Put(IS_DIR, true); 2171 parent.Put(IS_DIR, true);
(...skipping 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after
5352 Add(low_id_); 5352 Add(low_id_);
5353 Add(high_id_); 5353 Add(high_id_);
5354 SyncShareAsDelegate(); 5354 SyncShareAsDelegate();
5355 ExpectLocalOrderIsByServerId(); 5355 ExpectLocalOrderIsByServerId();
5356 } 5356 }
5357 5357
5358 const SyncerTest::CommitOrderingTest 5358 const SyncerTest::CommitOrderingTest
5359 SyncerTest::CommitOrderingTest::LAST_COMMIT_ITEM = {-1, TestIdFactory::root()}; 5359 SyncerTest::CommitOrderingTest::LAST_COMMIT_ITEM = {-1, TestIdFactory::root()};
5360 5360
5361 } // namespace browser_sync 5361 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/sync_scheduler_unittest.cc ('k') | chrome/browser/sync/glue/sync_backend_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698