summaryrefslogtreecommitdiffstats
path: root/sync/notifier/chrome_invalidation_client_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/notifier/chrome_invalidation_client_unittest.cc')
-rw-r--r--sync/notifier/chrome_invalidation_client_unittest.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/sync/notifier/chrome_invalidation_client_unittest.cc b/sync/notifier/chrome_invalidation_client_unittest.cc
index 225eab6..72d71da 100644
--- a/sync/notifier/chrome_invalidation_client_unittest.cc
+++ b/sync/notifier/chrome_invalidation_client_unittest.cc
@@ -46,9 +46,9 @@ class MockListener : public ChromeInvalidationClient::Listener {
MOCK_METHOD1(OnSessionStatusChanged, void(bool));
};
-class MockInvalidationStateTracker
- : public InvalidationStateTracker,
- public base::SupportsWeakPtr<MockInvalidationStateTracker> {
+class MockInvalidationVersionTracker
+ : public InvalidationVersionTracker,
+ public base::SupportsWeakPtr<MockInvalidationVersionTracker> {
public:
MOCK_CONST_METHOD0(GetAllMaxVersions, InvalidationVersionMap());
MOCK_METHOD2(SetMaxVersion, void(syncable::ModelType, int64));
@@ -67,7 +67,7 @@ class ChromeInvalidationClientTest : public testing::Test {
client_.Start(kClientId, kClientInfo, kState,
InvalidationVersionMap(),
browser_sync::MakeWeakHandle(
- mock_invalidation_state_tracker_.AsWeakPtr()),
+ mock_invalidation_version_tracker_.AsWeakPtr()),
&mock_listener_, &mock_state_writer_,
fake_base_task_.AsWeakPtr());
}
@@ -98,7 +98,7 @@ class ChromeInvalidationClientTest : public testing::Test {
EXPECT_CALL(mock_invalidation_client_, Acknowledge(ack_handle));
client_.Invalidate(&mock_invalidation_client_, inv, ack_handle);
// Pump message loop to trigger
- // InvalidationStateTracker::SetMaxVersion().
+ // InvalidationVersionTracker::SetMaxVersion().
message_loop_.RunAllPending();
}
@@ -121,8 +121,8 @@ class ChromeInvalidationClientTest : public testing::Test {
MessageLoop message_loop_;
StrictMock<MockListener> mock_listener_;
- StrictMock<MockInvalidationStateTracker>
- mock_invalidation_state_tracker_;
+ StrictMock<MockInvalidationVersionTracker>
+ mock_invalidation_version_tracker_;
StrictMock<MockStateWriter> mock_state_writer_;
StrictMock<MockInvalidationClient> mock_invalidation_client_;
notifier::FakeBaseTask fake_base_task_;
@@ -156,7 +156,7 @@ TEST_F(ChromeInvalidationClientTest, InvalidateBadObjectId) {
TEST_F(ChromeInvalidationClientTest, InvalidateNoPayload) {
EXPECT_CALL(mock_listener_,
OnInvalidate(MakeMap(syncable::BOOKMARKS, "")));
- EXPECT_CALL(mock_invalidation_state_tracker_,
+ EXPECT_CALL(mock_invalidation_version_tracker_,
SetMaxVersion(syncable::BOOKMARKS, 1));
FireInvalidate("BOOKMARK", 1, NULL);
}
@@ -164,7 +164,7 @@ TEST_F(ChromeInvalidationClientTest, InvalidateNoPayload) {
TEST_F(ChromeInvalidationClientTest, InvalidateWithPayload) {
EXPECT_CALL(mock_listener_,
OnInvalidate(MakeMap(syncable::PREFERENCES, "payload")));
- EXPECT_CALL(mock_invalidation_state_tracker_,
+ EXPECT_CALL(mock_invalidation_version_tracker_,
SetMaxVersion(syncable::PREFERENCES, 1));
FireInvalidate("PREFERENCE", 1, "payload");
}
@@ -174,7 +174,7 @@ TEST_F(ChromeInvalidationClientTest, InvalidateVersion) {
EXPECT_CALL(mock_listener_,
OnInvalidate(MakeMap(syncable::APPS, "")));
- EXPECT_CALL(mock_invalidation_state_tracker_,
+ EXPECT_CALL(mock_invalidation_version_tracker_,
SetMaxVersion(syncable::APPS, 1));
// Should trigger.
@@ -207,9 +207,9 @@ TEST_F(ChromeInvalidationClientTest, InvalidateVersionMultipleTypes) {
EXPECT_CALL(mock_listener_,
OnInvalidate(MakeMap(syncable::EXTENSIONS, "")));
- EXPECT_CALL(mock_invalidation_state_tracker_,
+ EXPECT_CALL(mock_invalidation_version_tracker_,
SetMaxVersion(syncable::APPS, 3));
- EXPECT_CALL(mock_invalidation_state_tracker_,
+ EXPECT_CALL(mock_invalidation_version_tracker_,
SetMaxVersion(syncable::EXTENSIONS, 2));
// Should trigger both.
@@ -217,21 +217,21 @@ TEST_F(ChromeInvalidationClientTest, InvalidateVersionMultipleTypes) {
FireInvalidate("EXTENSION", 2, NULL);
Mock::VerifyAndClearExpectations(&mock_listener_);
- Mock::VerifyAndClearExpectations(&mock_invalidation_state_tracker_);
+ Mock::VerifyAndClearExpectations(&mock_invalidation_version_tracker_);
// Should both be dropped.
FireInvalidate("APP", 1, NULL);
FireInvalidate("EXTENSION", 1, NULL);
Mock::VerifyAndClearExpectations(&mock_listener_);
- Mock::VerifyAndClearExpectations(&mock_invalidation_state_tracker_);
+ Mock::VerifyAndClearExpectations(&mock_invalidation_version_tracker_);
// InvalidateAll shouldn't change any version state.
EXPECT_CALL(mock_listener_, OnInvalidate(MakeMapFromSet(types, "")));
FireInvalidateAll();
Mock::VerifyAndClearExpectations(&mock_listener_);
- Mock::VerifyAndClearExpectations(&mock_invalidation_state_tracker_);
+ Mock::VerifyAndClearExpectations(&mock_invalidation_version_tracker_);
EXPECT_CALL(mock_listener_,
OnInvalidate(MakeMap(syncable::PREFERENCES, "")));
@@ -240,11 +240,11 @@ TEST_F(ChromeInvalidationClientTest, InvalidateVersionMultipleTypes) {
EXPECT_CALL(mock_listener_,
OnInvalidate(MakeMap(syncable::APPS, "")));
- EXPECT_CALL(mock_invalidation_state_tracker_,
+ EXPECT_CALL(mock_invalidation_version_tracker_,
SetMaxVersion(syncable::PREFERENCES, 5));
- EXPECT_CALL(mock_invalidation_state_tracker_,
+ EXPECT_CALL(mock_invalidation_version_tracker_,
SetMaxVersion(syncable::EXTENSIONS, 3));
- EXPECT_CALL(mock_invalidation_state_tracker_,
+ EXPECT_CALL(mock_invalidation_version_tracker_,
SetMaxVersion(syncable::APPS, 4));
// Should trigger all three.