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

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

Issue 10451058: sync: move invalidation version prefs out of SyncPrefs into InvalidatorStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 6 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 | « chrome/common/pref_names.cc ('k') | sync/notifier/invalidation_state_tracker.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 <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/v2/types.pb.h" 10 #include "google/cacheinvalidation/v2/types.pb.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 MOCK_METHOD1(OnInvalidate, void(const syncable::ModelTypePayloadMap&)); 45 MOCK_METHOD1(OnInvalidate, void(const syncable::ModelTypePayloadMap&));
46 MOCK_METHOD1(OnSessionStatusChanged, void(bool)); 46 MOCK_METHOD1(OnSessionStatusChanged, void(bool));
47 }; 47 };
48 48
49 class MockInvalidationStateTracker 49 class MockInvalidationStateTracker
50 : public InvalidationStateTracker, 50 : public InvalidationStateTracker,
51 public base::SupportsWeakPtr<MockInvalidationStateTracker> { 51 public base::SupportsWeakPtr<MockInvalidationStateTracker> {
52 public: 52 public:
53 MOCK_CONST_METHOD0(GetAllMaxVersions, InvalidationVersionMap()); 53 MOCK_CONST_METHOD0(GetAllMaxVersions, InvalidationVersionMap());
54 MOCK_METHOD2(SetMaxVersion, void(syncable::ModelType, int64)); 54 MOCK_METHOD2(SetMaxVersion, void(syncable::ModelType, int64));
55 MOCK_CONST_METHOD0(GetInvalidationState, std::string());
56 MOCK_METHOD1(SetInvalidationState, void(const std::string&));
55 }; 57 };
56 58
57 class MockStateWriter : public StateWriter { 59 class MockStateWriter : public StateWriter {
58 public: 60 public:
59 MOCK_METHOD1(WriteState, void(const std::string&)); 61 MOCK_METHOD1(WriteState, void(const std::string&));
60 }; 62 };
61 63
62 } // namespace 64 } // namespace
63 65
64 class ChromeInvalidationClientTest : public testing::Test { 66 class ChromeInvalidationClientTest : public testing::Test {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // Registered types should be preserved across Stop/Start. 268 // Registered types should be preserved across Stop/Start.
267 TearDown(); 269 TearDown();
268 SetUp(); 270 SetUp();
269 EXPECT_CALL(mock_listener_, OnInvalidate(MakeMapFromSet(types, ""))); 271 EXPECT_CALL(mock_listener_, OnInvalidate(MakeMapFromSet(types, "")));
270 FireInvalidateAll(); 272 FireInvalidateAll();
271 } 273 }
272 274
273 // TODO(akalin): Flesh out unit tests. 275 // TODO(akalin): Flesh out unit tests.
274 276
275 } // namespace sync_notifier 277 } // namespace sync_notifier
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | sync/notifier/invalidation_state_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698