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

Side by Side Diff: sync/notifier/chrome_invalidation_client_unittest.cc

Issue 10824140: Add InvalidationStateTracker::Forget() to erase an entry from storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "google/cacheinvalidation/include/invalidation-client.h" 8 #include "google/cacheinvalidation/include/invalidation-client.h"
9 #include "google/cacheinvalidation/include/types.h" 9 #include "google/cacheinvalidation/include/types.h"
10 #include "google/cacheinvalidation/types.pb.h" 10 #include "google/cacheinvalidation/types.pb.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 TEST_F(ChromeInvalidationClientTest, InvalidateAll) { 272 TEST_F(ChromeInvalidationClientTest, InvalidateAll) {
273 ObjectIdSet ids; 273 ObjectIdSet ids;
274 ids.insert(kPreferencesId_); 274 ids.insert(kPreferencesId_);
275 ids.insert(kExtensionsId_); 275 ids.insert(kExtensionsId_);
276 client_.RegisterIds(ids); 276 client_.RegisterIds(ids);
277 EXPECT_CALL(mock_listener_, OnInvalidate( 277 EXPECT_CALL(mock_listener_, OnInvalidate(
278 ObjectIdsAndPayloadToMap(ids, std::string()))); 278 ObjectIdsAndPayloadToMap(ids, std::string())));
279 FireInvalidateAll(); 279 FireInvalidateAll();
280 } 280 }
281 281
282 TEST_F(ChromeInvalidationClientTest, RegisterTypes) { 282 TEST_F(ChromeInvalidationClientTest, RegisterIds) {
283 ObjectIdSet ids; 283 ObjectIdSet ids;
284 ids.insert(kPreferencesId_); 284 ids.insert(kPreferencesId_);
285 ids.insert(kExtensionsId_); 285 ids.insert(kExtensionsId_);
286 client_.RegisterIds(ids); 286 client_.RegisterIds(ids);
287 // Registered types should be preserved across Stop/Start. 287 // Registered types should be preserved across Stop/Start.
288 TearDown(); 288 TearDown();
289 SetUp(); 289 SetUp();
290 EXPECT_CALL(mock_listener_,OnInvalidate( 290 EXPECT_CALL(mock_listener_,OnInvalidate(
291 ObjectIdsAndPayloadToMap(ids, std::string()))); 291 ObjectIdsAndPayloadToMap(ids, std::string())));
292 FireInvalidateAll(); 292 FireInvalidateAll();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 invalidation::ErrorContext())); 356 invalidation::ErrorContext()));
357 fake_push_client_->DisableNotifications( 357 fake_push_client_->DisableNotifications(
358 notifier::TRANSIENT_NOTIFICATION_ERROR); 358 notifier::TRANSIENT_NOTIFICATION_ERROR);
359 fake_push_client_->DisableNotifications( 359 fake_push_client_->DisableNotifications(
360 notifier::NOTIFICATION_CREDENTIALS_REJECTED); 360 notifier::NOTIFICATION_CREDENTIALS_REJECTED);
361 fake_push_client_->EnableNotifications(); 361 fake_push_client_->EnableNotifications();
362 client_.Ready(NULL); 362 client_.Ready(NULL);
363 } 363 }
364 364
365 } // namespace syncer 365 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698