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 "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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 virtual void TearDown() { | 193 virtual void TearDown() { |
194 dir_maker_.TearDown(); | 194 dir_maker_.TearDown(); |
195 } | 195 } |
196 | 196 |
197 syncable::Directory* directory() { | 197 syncable::Directory* directory() { |
198 return dir_maker_.directory(); | 198 return dir_maker_.directory(); |
199 } | 199 } |
200 | 200 |
201 protected: | 201 protected: |
202 MessageLoop message_loop_; | 202 base::MessageLoop message_loop_; |
203 TestDirectorySetterUpper dir_maker_; | 203 TestDirectorySetterUpper dir_maker_; |
204 }; | 204 }; |
205 | 205 |
206 TEST_F(SyncerProtoUtilTest, VerifyResponseBirthday) { | 206 TEST_F(SyncerProtoUtilTest, VerifyResponseBirthday) { |
207 // Both sides empty | 207 // Both sides empty |
208 EXPECT_TRUE(directory()->store_birthday().empty()); | 208 EXPECT_TRUE(directory()->store_birthday().empty()); |
209 sync_pb::ClientToServerResponse response; | 209 sync_pb::ClientToServerResponse response; |
210 EXPECT_FALSE(SyncerProtoUtil::VerifyResponseBirthday(response, directory())); | 210 EXPECT_FALSE(SyncerProtoUtil::VerifyResponseBirthday(response, directory())); |
211 | 211 |
212 // Remote set, local empty | 212 // Remote set, local empty |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 318 |
319 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); | 319 base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); |
320 | 320 |
321 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); | 321 EXPECT_CALL(delegate, OnSilencedUntil(ticks)); |
322 | 322 |
323 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); | 323 SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); |
324 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); | 324 EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); |
325 } | 325 } |
326 | 326 |
327 } // namespace syncer | 327 } // namespace syncer |
OLD | NEW |