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

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

Issue 23754021: Invalidation trickles mega-patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « sync/notifier/invalidator_registrar.cc ('k') | sync/notifier/invalidator_test_template.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "google/cacheinvalidation/types.pb.h" 8 #include "google/cacheinvalidation/types.pb.h"
9 #include "sync/notifier/fake_invalidation_handler.h" 9 #include "sync/notifier/fake_invalidation_handler.h"
10 #include "sync/notifier/invalidator_registrar.h" 10 #include "sync/notifier/invalidator_registrar.h"
11 #include "sync/notifier/invalidator_test_template.h" 11 #include "sync/notifier/invalidator_test_template.h"
12 #include "sync/notifier/object_id_invalidation_map_test_util.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 13
15 namespace syncer { 14 namespace syncer {
16 15
17 namespace { 16 namespace {
18 17
19 // We test InvalidatorRegistrar by wrapping it in an Invalidator and 18 // We test InvalidatorRegistrar by wrapping it in an Invalidator and
20 // running the usual Invalidator tests. 19 // running the usual Invalidator tests.
21 20
22 // Thin Invalidator wrapper around InvalidatorRegistrar. 21 // Thin Invalidator wrapper around InvalidatorRegistrar.
(...skipping 13 matching lines...) Expand all
36 35
37 virtual void UpdateRegisteredIds(InvalidationHandler* handler, 36 virtual void UpdateRegisteredIds(InvalidationHandler* handler,
38 const ObjectIdSet& ids) OVERRIDE { 37 const ObjectIdSet& ids) OVERRIDE {
39 registrar_.UpdateRegisteredIds(handler, ids); 38 registrar_.UpdateRegisteredIds(handler, ids);
40 } 39 }
41 40
42 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE { 41 virtual void UnregisterHandler(InvalidationHandler* handler) OVERRIDE {
43 registrar_.UnregisterHandler(handler); 42 registrar_.UnregisterHandler(handler);
44 } 43 }
45 44
46 virtual void Acknowledge(const invalidation::ObjectId& id,
47 const AckHandle& ack_handle) OVERRIDE {
48 // Do nothing.
49 }
50
51 virtual InvalidatorState GetInvalidatorState() const OVERRIDE { 45 virtual InvalidatorState GetInvalidatorState() const OVERRIDE {
52 return registrar_.GetInvalidatorState(); 46 return registrar_.GetInvalidatorState();
53 } 47 }
54 48
55 virtual void UpdateCredentials( 49 virtual void UpdateCredentials(
56 const std::string& email, const std::string& token) OVERRIDE { 50 const std::string& email, const std::string& token) OVERRIDE {
57 // Do nothing. 51 // Do nothing.
58 } 52 }
59 53
60 private: 54 private:
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 EXPECT_DEATH({ registrar.UpdateRegisteredIds(&handler2, ids); }, ""); 149 EXPECT_DEATH({ registrar.UpdateRegisteredIds(&handler2, ids); }, "");
156 150
157 registrar.UnregisterHandler(&handler2); 151 registrar.UnregisterHandler(&handler2);
158 registrar.UnregisterHandler(&handler1); 152 registrar.UnregisterHandler(&handler1);
159 } 153 }
160 #endif // GTEST_HAS_DEATH_TEST 154 #endif // GTEST_HAS_DEATH_TEST
161 155
162 } // namespace 156 } // namespace
163 157
164 } // namespace syncer 158 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/invalidator_registrar.cc ('k') | sync/notifier/invalidator_test_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698