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

Unified Diff: chrome/browser/sync/sessions/sync_session_context_unittest.cc

Issue 8851006: [Sync] Replace all instances of ModelTypeSet with ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sessions/sync_session_context_unittest.cc
diff --git a/chrome/browser/sync/sessions/sync_session_context_unittest.cc b/chrome/browser/sync/sessions/sync_session_context_unittest.cc
index db7eb77d4945ee25370d904c47491ba78786587b..963bd4f1dc5063a1e70d336963e0a76c219564a3 100644
--- a/chrome/browser/sync/sessions/sync_session_context_unittest.cc
+++ b/chrome/browser/sync/sessions/sync_session_context_unittest.cc
@@ -10,9 +10,9 @@
namespace browser_sync {
namespace sessions {
TEST(SyncSessionContextTest, AddUnthrottleTimeTest) {
- syncable::ModelTypeSet types;
- types.insert(syncable::BOOKMARKS);
- types.insert(syncable::PASSWORDS);
+ syncable::ModelEnumSet types;
+ types.Put(syncable::BOOKMARKS);
+ types.Put(syncable::PASSWORDS);
SyncSessionContext context;
base::TimeTicks now = base::TimeTicks::Now();
@@ -24,9 +24,9 @@ TEST(SyncSessionContextTest, AddUnthrottleTimeTest) {
}
TEST(SyncSessionContextTest, GetCurrentlyThrottledTypesTest) {
- syncable::ModelTypeSet types;
- types.insert(syncable::BOOKMARKS);
- types.insert(syncable::PASSWORDS);
+ syncable::ModelEnumSet types;
+ types.Put(syncable::BOOKMARKS);
+ types.Put(syncable::PASSWORDS);
SyncSessionContext context;
base::TimeTicks now = base::TimeTicks::Now();
@@ -35,12 +35,12 @@ TEST(SyncSessionContextTest, GetCurrentlyThrottledTypesTest) {
// now.
context.SetUnthrottleTime(types, now - base::TimeDelta::FromSeconds(10));
context.PruneUnthrottledTypes(base::TimeTicks::Now());
- EXPECT_EQ(context.GetThrottledTypes(), syncable::ModelTypeSet());
+ EXPECT_TRUE(context.GetThrottledTypes().Empty());
// Now update the throttled types with time set to 2 hours from now.
context.SetUnthrottleTime(types, now + base::TimeDelta::FromSeconds(1200));
context.PruneUnthrottledTypes(base::TimeTicks::Now());
- EXPECT_EQ(context.GetThrottledTypes(), types);
+ EXPECT_TRUE(context.GetThrottledTypes().Equals(types));
}
} // namespace sessions.
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698