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

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler_unittest.cc

Issue 13197004: Draft: InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passes tests Created 7 years, 8 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 "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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_handler_delegate.h" 9 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_handler_delegate.h"
10 #include "chrome/browser/sync/invalidation_frontend.h" 10 #include "chrome/browser/sync/invalidation_frontend.h"
(...skipping 17 matching lines...) Expand all
28 ~MockInvalidationFrontend(); 28 ~MockInvalidationFrontend();
29 MOCK_METHOD1(RegisterInvalidationHandler, 29 MOCK_METHOD1(RegisterInvalidationHandler,
30 void(syncer::InvalidationHandler*)); 30 void(syncer::InvalidationHandler*));
31 MOCK_METHOD2(UpdateRegisteredInvalidationIds, 31 MOCK_METHOD2(UpdateRegisteredInvalidationIds,
32 void(syncer::InvalidationHandler*, const syncer::ObjectIdSet&)); 32 void(syncer::InvalidationHandler*, const syncer::ObjectIdSet&));
33 MOCK_METHOD1(UnregisterInvalidationHandler, 33 MOCK_METHOD1(UnregisterInvalidationHandler,
34 void(syncer::InvalidationHandler*)); 34 void(syncer::InvalidationHandler*));
35 MOCK_METHOD2(AcknowledgeInvalidation, void(const invalidation::ObjectId&, 35 MOCK_METHOD2(AcknowledgeInvalidation, void(const invalidation::ObjectId&,
36 const syncer::AckHandle&)); 36 const syncer::AckHandle&));
37 MOCK_CONST_METHOD0(GetInvalidatorState, syncer::InvalidatorState()); 37 MOCK_CONST_METHOD0(GetInvalidatorState, syncer::InvalidatorState());
38 MOCK_CONST_METHOD0(GetInvalidatorClientId, std::string());
38 39
39 private: 40 private:
40 DISALLOW_COPY_AND_ASSIGN(MockInvalidationFrontend); 41 DISALLOW_COPY_AND_ASSIGN(MockInvalidationFrontend);
41 }; 42 };
42 43
43 MockInvalidationFrontend::MockInvalidationFrontend() {} 44 MockInvalidationFrontend::MockInvalidationFrontend() {}
44 MockInvalidationFrontend::~MockInvalidationFrontend() {} 45 MockInvalidationFrontend::~MockInvalidationFrontend() {}
45 46
46 class MockInvalidationHandlerDelegate 47 class MockInvalidationHandlerDelegate
47 : public PushMessagingInvalidationHandlerDelegate { 48 : public PushMessagingInvalidationHandlerDelegate {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 for (syncer::ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); 155 for (syncer::ObjectIdSet::const_iterator it = ids.begin(); it != ids.end();
155 ++it) { 156 ++it) {
156 EXPECT_CALL(service_, AcknowledgeInvalidation( 157 EXPECT_CALL(service_, AcknowledgeInvalidation(
157 *it, syncer::AckHandle::InvalidAckHandle())); 158 *it, syncer::AckHandle::InvalidAckHandle()));
158 } 159 }
159 handler_->OnIncomingInvalidation( 160 handler_->OnIncomingInvalidation(
160 ObjectIdSetToInvalidationMap(ids, "payload")); 161 ObjectIdSetToInvalidationMap(ids, "payload"));
161 } 162 }
162 163
163 } // namespace extensions 164 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698