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

Side by Side Diff: sync/engine/syncer_proto_util_unittest.cc

Issue 14963002: sync: Report GetUpdate triggers to the server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix handling of NEW_CLIENT GU source Created 7 years, 7 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
« no previous file with comments | « sync/engine/syncer_proto_util.cc ('k') | sync/engine/syncer_unittest.cc » ('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 "sync/engine/syncer_proto_util.h" 5 #include "sync/engine/syncer_proto_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 25 matching lines...) Expand all
36 36
37 class MockDelegate : public sessions::SyncSession::Delegate { 37 class MockDelegate : public sessions::SyncSession::Delegate {
38 public: 38 public:
39 MockDelegate() {} 39 MockDelegate() {}
40 ~MockDelegate() {} 40 ~MockDelegate() {}
41 41
42 MOCK_METHOD0(IsSyncingCurrentlySilenced, bool()); 42 MOCK_METHOD0(IsSyncingCurrentlySilenced, bool());
43 MOCK_METHOD1(OnReceivedShortPollIntervalUpdate, void(const base::TimeDelta&)); 43 MOCK_METHOD1(OnReceivedShortPollIntervalUpdate, void(const base::TimeDelta&));
44 MOCK_METHOD1(OnReceivedLongPollIntervalUpdate ,void(const base::TimeDelta&)); 44 MOCK_METHOD1(OnReceivedLongPollIntervalUpdate ,void(const base::TimeDelta&));
45 MOCK_METHOD1(OnReceivedSessionsCommitDelay, void(const base::TimeDelta&)); 45 MOCK_METHOD1(OnReceivedSessionsCommitDelay, void(const base::TimeDelta&));
46 MOCK_METHOD1(OnReceivedClientInvalidationHintBufferSize, void(int));
46 MOCK_METHOD1(OnSyncProtocolError, void(const sessions::SyncSessionSnapshot&)); 47 MOCK_METHOD1(OnSyncProtocolError, void(const sessions::SyncSessionSnapshot&));
47 MOCK_METHOD0(OnShouldStopSyncingPermanently, void()); 48 MOCK_METHOD0(OnShouldStopSyncingPermanently, void());
48 MOCK_METHOD1(OnSilencedUntil, void(const base::TimeTicks&)); 49 MOCK_METHOD1(OnSilencedUntil, void(const base::TimeTicks&));
49 }; 50 };
50 51
51 // Builds a ClientToServerResponse with some data type ids, including 52 // Builds a ClientToServerResponse with some data type ids, including
52 // invalid ones. GetTypesToMigrate() should return only the valid 53 // invalid ones. GetTypesToMigrate() should return only the valid
53 // model types. 54 // model types.
54 TEST(SyncerProtoUtil, GetTypesToMigrate) { 55 TEST(SyncerProtoUtil, GetTypesToMigrate) {
55 sync_pb::ClientToServerResponse response; 56 sync_pb::ClientToServerResponse response;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 319
319 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); 320 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1);
320 321
321 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); 322 EXPECT_CALL(delegate, OnSilencedUntil(ticks));
322 323
323 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); 324 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate);
324 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); 325 EXPECT_TRUE(tracker.GetThrottledTypes().Empty());
325 } 326 }
326 327
327 } // namespace syncer 328 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/syncer_proto_util.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698