| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |