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

Unified Diff: chrome/browser/sync/glue/chrome_sync_notification_bridge_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
Index: chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc b/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
index ff0b0ad69e1eaee5b7b6382bab9ad2d0a1fe2022..ffd42fd6eea1e76ee1bbe028c166f802de0ecf31 100644
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc
@@ -42,7 +42,7 @@ class FakeSyncNotifierObserverIO
public:
FakeSyncNotifierObserverIO(
ChromeSyncNotificationBridge* bridge,
- const syncable::ModelTypePayloadMap& expected_payloads)
+ const syncer::ModelTypePayloadMap& expected_payloads)
: bridge_(bridge),
received_improper_notification_(false),
notification_count_(0),
@@ -57,7 +57,7 @@ class FakeSyncNotifierObserverIO
// SyncNotifierObserver implementation.
virtual void OnIncomingNotification(
- const syncable::ModelTypePayloadMap& type_payloads,
+ const syncer::ModelTypePayloadMap& type_payloads,
syncer::IncomingNotificationSource source) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
notification_count_++;
@@ -86,7 +86,7 @@ class FakeSyncNotifierObserverIO
ChromeSyncNotificationBridge* bridge_;
bool received_improper_notification_;
size_t notification_count_;
- syncable::ModelTypePayloadMap expected_payloads_;
+ syncer::ModelTypePayloadMap expected_payloads_;
};
class ChromeSyncNotificationBridgeTest : public testing::Test {
@@ -133,14 +133,14 @@ class ChromeSyncNotificationBridgeTest : public testing::Test {
}
void CreateObserverOnIOThread(
- syncable::ModelTypePayloadMap expected_payloads) {
+ syncer::ModelTypePayloadMap expected_payloads) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
io_observer_ = new FakeSyncNotifierObserverIO(&bridge_,
expected_payloads);
}
void CreateObserverWithExpectedPayload(
- syncable::ModelTypePayloadMap expected_payloads) {
+ syncer::ModelTypePayloadMap expected_payloads) {
ASSERT_TRUE(BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
@@ -169,11 +169,11 @@ class ChromeSyncNotificationBridgeTest : public testing::Test {
void TriggerRefreshNotification(
int type,
- const syncable::ModelTypePayloadMap& payload_map) {
+ const syncer::ModelTypePayloadMap& payload_map) {
content::NotificationService::current()->Notify(
type,
content::Source<Profile>(&mock_profile_),
- content::Details<const syncable::ModelTypePayloadMap>(&payload_map));
+ content::Details<const syncer::ModelTypePayloadMap>(&payload_map));
}
MessageLoop ui_loop_;
@@ -190,8 +190,8 @@ class ChromeSyncNotificationBridgeTest : public testing::Test {
// Adds an observer on the UI thread, triggers a local refresh notification, and
// ensures the bridge posts a LOCAL_NOTIFICATION with the proper payload to it.
TEST_F(ChromeSyncNotificationBridgeTest, LocalNotification) {
- syncable::ModelTypePayloadMap payload_map;
- payload_map[syncable::SESSIONS] = "";
+ syncer::ModelTypePayloadMap payload_map;
+ payload_map[syncer::SESSIONS] = "";
StrictMock<syncer::MockSyncNotifierObserver> observer;
EXPECT_CALL(observer,
OnIncomingNotification(payload_map,
@@ -207,8 +207,8 @@ TEST_F(ChromeSyncNotificationBridgeTest, LocalNotification) {
// and ensures the bridge posts a REMOTE_NOTIFICATION with the proper payload
// to it.
TEST_F(ChromeSyncNotificationBridgeTest, RemoteNotification) {
- syncable::ModelTypePayloadMap payload_map;
- payload_map[syncable::BOOKMARKS] = "";
+ syncer::ModelTypePayloadMap payload_map;
+ payload_map[syncer::BOOKMARKS] = "";
StrictMock<syncer::MockSyncNotifierObserver> observer;
EXPECT_CALL(observer,
OnIncomingNotification(payload_map,
@@ -224,10 +224,10 @@ TEST_F(ChromeSyncNotificationBridgeTest, RemoteNotification) {
// with empty payload map and ensures the bridge posts a
// LOCAL_NOTIFICATION with the proper payload to it.
TEST_F(ChromeSyncNotificationBridgeTest, LocalNotificationEmptyPayloadMap) {
- const syncable::ModelTypeSet enabled_types(
- syncable::BOOKMARKS, syncable::PASSWORDS);
- const syncable::ModelTypePayloadMap enabled_types_payload_map =
- syncable::ModelTypePayloadMapFromEnumSet(enabled_types, std::string());
+ const syncer::ModelTypeSet enabled_types(
+ syncer::BOOKMARKS, syncer::PASSWORDS);
+ const syncer::ModelTypePayloadMap enabled_types_payload_map =
+ syncer::ModelTypePayloadMapFromEnumSet(enabled_types, std::string());
StrictMock<syncer::MockSyncNotifierObserver> observer;
EXPECT_CALL(observer,
@@ -237,7 +237,7 @@ TEST_F(ChromeSyncNotificationBridgeTest, LocalNotificationEmptyPayloadMap) {
// Set enabled types on the bridge.
bridge_.UpdateEnabledTypes(enabled_types);
TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_LOCAL,
- syncable::ModelTypePayloadMap());
+ syncer::ModelTypePayloadMap());
ui_loop_.RunAllPending();
Mock::VerifyAndClearExpectations(&observer);
}
@@ -246,10 +246,10 @@ TEST_F(ChromeSyncNotificationBridgeTest, LocalNotificationEmptyPayloadMap) {
// with empty payload map and ensures the bridge posts a
// REMOTE_NOTIFICATION with the proper payload to it.
TEST_F(ChromeSyncNotificationBridgeTest, RemoteNotificationEmptyPayloadMap) {
- const syncable::ModelTypeSet enabled_types(
- syncable::BOOKMARKS, syncable::TYPED_URLS);
- const syncable::ModelTypePayloadMap enabled_types_payload_map =
- syncable::ModelTypePayloadMapFromEnumSet(enabled_types, std::string());
+ const syncer::ModelTypeSet enabled_types(
+ syncer::BOOKMARKS, syncer::TYPED_URLS);
+ const syncer::ModelTypePayloadMap enabled_types_payload_map =
+ syncer::ModelTypePayloadMapFromEnumSet(enabled_types, std::string());
StrictMock<syncer::MockSyncNotifierObserver> observer;
EXPECT_CALL(observer,
@@ -259,7 +259,7 @@ TEST_F(ChromeSyncNotificationBridgeTest, RemoteNotificationEmptyPayloadMap) {
// Set enabled types on the bridge.
bridge_.UpdateEnabledTypes(enabled_types);
TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_REMOTE,
- syncable::ModelTypePayloadMap());
+ syncer::ModelTypePayloadMap());
ui_loop_.RunAllPending();
Mock::VerifyAndClearExpectations(&observer);
}
@@ -268,8 +268,8 @@ TEST_F(ChromeSyncNotificationBridgeTest, RemoteNotificationEmptyPayloadMap) {
// the UI thread. We finally verify the proper notification was received by the
// observer and destroy it on the I/O thread.
TEST_F(ChromeSyncNotificationBridgeTest, BasicThreaded) {
- syncable::ModelTypePayloadMap payload_map;
- payload_map[syncable::SESSIONS] = "";
+ syncer::ModelTypePayloadMap payload_map;
+ payload_map[syncer::SESSIONS] = "";
CreateObserverWithExpectedPayload(payload_map);
TriggerRefreshNotification(chrome::NOTIFICATION_SYNC_REFRESH_LOCAL,
payload_map);
« no previous file with comments | « chrome/browser/sync/glue/chrome_sync_notification_bridge.cc ('k') | chrome/browser/sync/glue/data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698