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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 using testing::WithoutArgs; | 37 using testing::WithoutArgs; |
38 | 38 |
39 namespace syncer { | 39 namespace syncer { |
40 using sessions::SyncSession; | 40 using sessions::SyncSession; |
41 using sessions::SyncSessionContext; | 41 using sessions::SyncSessionContext; |
42 using sync_pb::GetUpdatesCallerInfo; | 42 using sync_pb::GetUpdatesCallerInfo; |
43 | 43 |
44 class MockSyncer : public Syncer { | 44 class MockSyncer : public Syncer { |
45 public: | 45 public: |
46 MockSyncer(); | 46 MockSyncer(); |
47 MOCK_METHOD3(NormalSyncShare, bool(ModelTypeSet, | 47 MOCK_METHOD3(NormalSyncShare, |
48 const sessions::NudgeTracker&, | 48 bool(ModelTypeSet, |
49 sessions::SyncSession*)); | 49 sessions::NudgeTracker*, |
| 50 sessions::SyncSession*)); |
50 MOCK_METHOD3(ConfigureSyncShare, | 51 MOCK_METHOD3(ConfigureSyncShare, |
51 bool(ModelTypeSet, | 52 bool(ModelTypeSet, |
52 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource, | 53 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource, |
53 SyncSession*)); | 54 SyncSession*)); |
54 MOCK_METHOD2(PollSyncShare, bool(ModelTypeSet, sessions::SyncSession*)); | 55 MOCK_METHOD2(PollSyncShare, bool(ModelTypeSet, sessions::SyncSession*)); |
55 }; | 56 }; |
56 | 57 |
57 MockSyncer::MockSyncer() | 58 MockSyncer::MockSyncer() |
58 : Syncer(NULL) {} | 59 : Syncer(NULL) {} |
59 | 60 |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), | 1370 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), |
1370 RecordSyncShare(×))); | 1371 RecordSyncShare(×))); |
1371 | 1372 |
1372 // Run to wait for retrying. | 1373 // Run to wait for retrying. |
1373 RunLoop(); | 1374 RunLoop(); |
1374 | 1375 |
1375 StopSyncScheduler(); | 1376 StopSyncScheduler(); |
1376 } | 1377 } |
1377 | 1378 |
1378 } // namespace syncer | 1379 } // namespace syncer |
OLD | NEW |