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 "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_handler.h" | 5 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_handler.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/callback.h" |
8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_handler_delegate.h" | 10 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_handler_delegate.h" |
10 #include "components/invalidation/invalidation_logger.h" | 11 #include "components/invalidation/invalidation_logger.h" |
11 #include "components/invalidation/invalidation_service.h" | 12 #include "components/invalidation/invalidation_service.h" |
12 #include "components/invalidation/object_id_invalidation_map.h" | 13 #include "components/invalidation/object_id_invalidation_map.h" |
13 #include "google/cacheinvalidation/types.pb.h" | 14 #include "google/cacheinvalidation/types.pb.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
17 using ::testing::NotNull; | 18 using ::testing::NotNull; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 204 |
204 // An unrelated object should be unaffected by all the above. | 205 // An unrelated object should be unaffected by all the above. |
205 syncer::ObjectIdInvalidationMap map5; | 206 syncer::ObjectIdInvalidationMap map5; |
206 map5.Insert(syncer::Invalidation::Init(id3, 1, "1")); | 207 map5.Insert(syncer::Invalidation::Init(id3, 1, "1")); |
207 EXPECT_CALL(delegate_, OnMessage("dddddddddddddddddddddddddddddddd", 3, "1")); | 208 EXPECT_CALL(delegate_, OnMessage("dddddddddddddddddddddddddddddddd", 3, "1")); |
208 handler_->OnIncomingInvalidation(map5); | 209 handler_->OnIncomingInvalidation(map5); |
209 testing::Mock::VerifyAndClearExpectations(&delegate_); | 210 testing::Mock::VerifyAndClearExpectations(&delegate_); |
210 } | 211 } |
211 | 212 |
212 } // namespace extensions | 213 } // namespace extensions |
OLD | NEW |