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, | 47 MOCK_METHOD3(NormalSyncShare, bool(ModelTypeSet, |
48 bool(ModelTypeSet, | 48 const sessions::NudgeTracker&, |
49 sessions::NudgeTracker*, | 49 sessions::SyncSession*)); |
50 sessions::SyncSession*)); | |
51 MOCK_METHOD3(ConfigureSyncShare, | 50 MOCK_METHOD3(ConfigureSyncShare, |
52 bool(ModelTypeSet, | 51 bool(ModelTypeSet, |
53 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource, | 52 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource, |
54 SyncSession*)); | 53 SyncSession*)); |
55 MOCK_METHOD2(PollSyncShare, bool(ModelTypeSet, sessions::SyncSession*)); | 54 MOCK_METHOD2(PollSyncShare, bool(ModelTypeSet, sessions::SyncSession*)); |
56 }; | 55 }; |
57 | 56 |
58 MockSyncer::MockSyncer() | 57 MockSyncer::MockSyncer() |
59 : Syncer(NULL) {} | 58 : Syncer(NULL) {} |
60 | 59 |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), | 1369 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), |
1371 RecordSyncShare(×))); | 1370 RecordSyncShare(×))); |
1372 | 1371 |
1373 // Run to wait for retrying. | 1372 // Run to wait for retrying. |
1374 RunLoop(); | 1373 RunLoop(); |
1375 | 1374 |
1376 StopSyncScheduler(); | 1375 StopSyncScheduler(); |
1377 } | 1376 } |
1378 | 1377 |
1379 } // namespace syncer | 1378 } // namespace syncer |
OLD | NEW |