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

Unified Diff: sync/sessions/sync_session_unittest.cc

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sessions/sync_session.cc ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session_unittest.cc
diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc
index 45e2a080e964cbccfabb8fbfb57960c8bcb85066..6fe3bb07df8fa8b1acb776f430625d67e63a5ec6 100644
--- a/sync/sessions/sync_session_unittest.cc
+++ b/sync/sessions/sync_session_unittest.cc
@@ -53,8 +53,8 @@ class SyncSessionTest : public testing::Test,
throttled_data_type_tracker_.get(),
std::vector<SyncEngineEventListener*>(), NULL, NULL));
routes_.clear();
- routes_[syncable::BOOKMARKS] = GROUP_UI;
- routes_[syncable::AUTOFILL] = GROUP_DB;
+ routes_[syncer::BOOKMARKS] = GROUP_UI;
+ routes_[syncer::AUTOFILL] = GROUP_DB;
scoped_refptr<ModelSafeWorker> passive_worker(
new FakeModelWorker(GROUP_PASSIVE));
scoped_refptr<ModelSafeWorker> ui_worker(
@@ -118,14 +118,13 @@ class SyncSessionTest : public testing::Test,
FAIL() << msg;
}
- syncable::ModelTypeSet ParamsMeaningAllEnabledTypes() {
- syncable::ModelTypeSet request_params(
- syncable::BOOKMARKS, syncable::AUTOFILL);
+ syncer::ModelTypeSet ParamsMeaningAllEnabledTypes() {
+ syncer::ModelTypeSet request_params(syncer::BOOKMARKS, syncer::AUTOFILL);
return request_params;
}
- syncable::ModelTypeSet ParamsMeaningJustOneEnabledType() {
- return syncable::ModelTypeSet(syncable::AUTOFILL);
+ syncer::ModelTypeSet ParamsMeaningJustOneEnabledType() {
+ return syncer::ModelTypeSet(syncer::AUTOFILL);
}
MessageLoop message_loop_;
@@ -267,12 +266,12 @@ TEST_F(SyncSessionTest, ResetTransientState) {
TEST_F(SyncSessionTest, Coalesce) {
std::vector<ModelSafeWorker*> workers_one, workers_two;
ModelSafeRoutingInfo routes_one, routes_two;
- syncable::ModelTypePayloadMap one_type =
- syncable::ModelTypePayloadMapFromEnumSet(
+ syncer::ModelTypePayloadMap one_type =
+ syncer::ModelTypePayloadMapFromEnumSet(
ParamsMeaningJustOneEnabledType(),
std::string());
- syncable::ModelTypePayloadMap all_types =
- syncable::ModelTypePayloadMapFromEnumSet(
+ syncer::ModelTypePayloadMap all_types =
+ syncer::ModelTypePayloadMapFromEnumSet(
ParamsMeaningAllEnabledTypes(),
std::string());
SyncSourceInfo source_one(sync_pb::GetUpdatesCallerInfo::PERIODIC, one_type);
@@ -287,9 +286,9 @@ TEST_F(SyncSessionTest, Coalesce) {
workers_two.push_back(passive_worker);
workers_two.push_back(db_worker);
workers_two.push_back(ui_worker);
- routes_one[syncable::AUTOFILL] = GROUP_DB;
- routes_two[syncable::AUTOFILL] = GROUP_DB;
- routes_two[syncable::BOOKMARKS] = GROUP_UI;
+ routes_one[syncer::AUTOFILL] = GROUP_DB;
+ routes_two[syncer::AUTOFILL] = GROUP_DB;
+ routes_two[syncer::BOOKMARKS] = GROUP_UI;
SyncSession one(context_.get(), this, source_one, routes_one, workers_one);
SyncSession two(context_.get(), this, source_two, routes_two, workers_two);
@@ -324,12 +323,12 @@ TEST_F(SyncSessionTest, Coalesce) {
TEST_F(SyncSessionTest, RebaseRoutingInfoWithLatestRemoveOneType) {
std::vector<ModelSafeWorker*> workers_one, workers_two;
ModelSafeRoutingInfo routes_one, routes_two;
- syncable::ModelTypePayloadMap one_type =
- syncable::ModelTypePayloadMapFromEnumSet(
+ syncer::ModelTypePayloadMap one_type =
+ syncer::ModelTypePayloadMapFromEnumSet(
ParamsMeaningJustOneEnabledType(),
std::string());
- syncable::ModelTypePayloadMap all_types =
- syncable::ModelTypePayloadMapFromEnumSet(
+ syncer::ModelTypePayloadMap all_types =
+ syncer::ModelTypePayloadMapFromEnumSet(
ParamsMeaningAllEnabledTypes(),
std::string());
SyncSourceInfo source_one(sync_pb::GetUpdatesCallerInfo::PERIODIC, one_type);
@@ -344,9 +343,9 @@ TEST_F(SyncSessionTest, RebaseRoutingInfoWithLatestRemoveOneType) {
workers_two.push_back(passive_worker);
workers_two.push_back(db_worker);
workers_two.push_back(ui_worker);
- routes_one[syncable::AUTOFILL] = GROUP_DB;
- routes_two[syncable::AUTOFILL] = GROUP_DB;
- routes_two[syncable::BOOKMARKS] = GROUP_UI;
+ routes_one[syncer::AUTOFILL] = GROUP_DB;
+ routes_two[syncer::AUTOFILL] = GROUP_DB;
+ routes_two[syncer::BOOKMARKS] = GROUP_UI;
SyncSession one(context_.get(), this, source_one, routes_one, workers_one);
SyncSession two(context_.get(), this, source_two, routes_two, workers_two);
@@ -385,7 +384,7 @@ TEST_F(SyncSessionTest, RebaseRoutingInfoWithLatestRemoveOneType) {
// Make sure the model safe routing info is reduced to one type.
ModelSafeRoutingInfo::const_iterator it =
- two.routing_info().find(syncable::AUTOFILL);
+ two.routing_info().find(syncer::AUTOFILL);
// Note that attempting to use EXPECT_NE would fail for an Android build due
// to seeming incompatibility with gtest and stlport.
EXPECT_TRUE(it != two.routing_info().end());
@@ -396,8 +395,8 @@ TEST_F(SyncSessionTest, RebaseRoutingInfoWithLatestRemoveOneType) {
TEST_F(SyncSessionTest, RebaseRoutingInfoWithLatestWithSameType) {
std::vector<ModelSafeWorker*> workers_first, workers_second;
ModelSafeRoutingInfo routes_first, routes_second;
- syncable::ModelTypePayloadMap all_types =
- syncable::ModelTypePayloadMapFromEnumSet(
+ syncer::ModelTypePayloadMap all_types =
+ syncer::ModelTypePayloadMapFromEnumSet(
ParamsMeaningAllEnabledTypes(),
std::string());
SyncSourceInfo source_first(sync_pb::GetUpdatesCallerInfo::PERIODIC,
@@ -415,10 +414,10 @@ TEST_F(SyncSessionTest, RebaseRoutingInfoWithLatestWithSameType) {
workers_second.push_back(passive_worker);
workers_second.push_back(db_worker);
workers_second.push_back(ui_worker);
- routes_first[syncable::AUTOFILL] = GROUP_DB;
- routes_first[syncable::BOOKMARKS] = GROUP_UI;
- routes_second[syncable::AUTOFILL] = GROUP_DB;
- routes_second[syncable::BOOKMARKS] = GROUP_UI;
+ routes_first[syncer::AUTOFILL] = GROUP_DB;
+ routes_first[syncer::BOOKMARKS] = GROUP_UI;
+ routes_second[syncer::AUTOFILL] = GROUP_DB;
+ routes_second[syncer::BOOKMARKS] = GROUP_UI;
SyncSession first(context_.get(), this, source_first, routes_first,
workers_first);
SyncSession second(context_.get(), this, source_second, routes_second,
@@ -459,9 +458,9 @@ TEST_F(SyncSessionTest, RebaseRoutingInfoWithLatestWithSameType) {
// Make sure the model safe routing info is reduced to first type.
ModelSafeRoutingInfo::const_iterator it1 =
- second.routing_info().find(syncable::AUTOFILL);
+ second.routing_info().find(syncer::AUTOFILL);
ModelSafeRoutingInfo::const_iterator it2 =
- second.routing_info().find(syncable::BOOKMARKS);
+ second.routing_info().find(syncer::BOOKMARKS);
// Note that attempting to use EXPECT_NE would fail for an Android build due
// to seeming incompatibility with gtest and stlport.
@@ -477,23 +476,23 @@ TEST_F(SyncSessionTest, RebaseRoutingInfoWithLatestWithSameType) {
TEST_F(SyncSessionTest, MakeTypePayloadMapFromBitSet) {
- syncable::ModelTypeSet types;
+ syncer::ModelTypeSet types;
std::string payload = "test";
- syncable::ModelTypePayloadMap types_with_payloads =
- syncable::ModelTypePayloadMapFromEnumSet(types, payload);
+ syncer::ModelTypePayloadMap types_with_payloads =
+ syncer::ModelTypePayloadMapFromEnumSet(types, payload);
EXPECT_TRUE(types_with_payloads.empty());
- types.Put(syncable::BOOKMARKS);
- types.Put(syncable::PASSWORDS);
- types.Put(syncable::AUTOFILL);
+ types.Put(syncer::BOOKMARKS);
+ types.Put(syncer::PASSWORDS);
+ types.Put(syncer::AUTOFILL);
payload = "test2";
types_with_payloads =
- syncable::ModelTypePayloadMapFromEnumSet(types, payload);
+ syncer::ModelTypePayloadMapFromEnumSet(types, payload);
ASSERT_EQ(3U, types_with_payloads.size());
- EXPECT_EQ(types_with_payloads[syncable::BOOKMARKS], payload);
- EXPECT_EQ(types_with_payloads[syncable::PASSWORDS], payload);
- EXPECT_EQ(types_with_payloads[syncable::AUTOFILL], payload);
+ EXPECT_EQ(types_with_payloads[syncer::BOOKMARKS], payload);
+ EXPECT_EQ(types_with_payloads[syncer::PASSWORDS], payload);
+ EXPECT_EQ(types_with_payloads[syncer::AUTOFILL], payload);
}
} // namespace
« no previous file with comments | « sync/sessions/sync_session.cc ('k') | sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698