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

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 pass #2 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
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_context.cc ('k') | chrome/browser/sync/sync_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4a43752fe074676a5fc4fffc612f8fdaea067a58 100644
--- a/chrome/browser/sync/sessions/sync_session_context_unittest.cc
+++ b/chrome/browser/sync/sessions/sync_session_context_unittest.cc
@@ -10,9 +10,8 @@
namespace browser_sync {
namespace sessions {
TEST(SyncSessionContextTest, AddUnthrottleTimeTest) {
- syncable::ModelTypeSet types;
- types.insert(syncable::BOOKMARKS);
- types.insert(syncable::PASSWORDS);
+ const syncable::ModelEnumSet types(
+ syncable::BOOKMARKS, syncable::PASSWORDS);
SyncSessionContext context;
base::TimeTicks now = base::TimeTicks::Now();
@@ -24,9 +23,8 @@ TEST(SyncSessionContextTest, AddUnthrottleTimeTest) {
}
TEST(SyncSessionContextTest, GetCurrentlyThrottledTypesTest) {
- syncable::ModelTypeSet types;
- types.insert(syncable::BOOKMARKS);
- types.insert(syncable::PASSWORDS);
+ const syncable::ModelEnumSet types(
+ syncable::BOOKMARKS, syncable::PASSWORDS);
SyncSessionContext context;
base::TimeTicks now = base::TimeTicks::Now();
@@ -35,12 +33,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
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_context.cc ('k') | chrome/browser/sync/sync_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698