| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "sync/test/engine/syncer_command_test.h" | |
| 6 | |
| 7 namespace syncer { | |
| 8 | |
| 9 const unsigned int kMaxMessages = 10; | |
| 10 const unsigned int kMaxMessageSize = 5 * 1024; | |
| 11 | |
| 12 void SyncerCommandTestBase::OnThrottled( | |
| 13 const base::TimeDelta& throttle_duration) { | |
| 14 FAIL() << "Should not get silenced."; | |
| 15 } | |
| 16 | |
| 17 void SyncerCommandTestBase::OnTypesThrottled( | |
| 18 ModelTypeSet types, | |
| 19 const base::TimeDelta& throttle_duration) { | |
| 20 FAIL() << "Should not get silenced."; | |
| 21 } | |
| 22 | |
| 23 bool SyncerCommandTestBase::IsCurrentlyThrottled() { | |
| 24 return false; | |
| 25 } | |
| 26 | |
| 27 void SyncerCommandTestBase::OnReceivedLongPollIntervalUpdate( | |
| 28 const base::TimeDelta& new_interval) { | |
| 29 FAIL() << "Should not get poll interval update."; | |
| 30 } | |
| 31 | |
| 32 void SyncerCommandTestBase::OnReceivedShortPollIntervalUpdate( | |
| 33 const base::TimeDelta& new_interval) { | |
| 34 FAIL() << "Should not get poll interval update."; | |
| 35 } | |
| 36 | |
| 37 void SyncerCommandTestBase::OnReceivedSessionsCommitDelay( | |
| 38 const base::TimeDelta& new_delay) { | |
| 39 FAIL() << "Should not get sessions commit delay."; | |
| 40 } | |
| 41 | |
| 42 void SyncerCommandTestBase::OnReceivedClientInvalidationHintBufferSize( | |
| 43 int size) { | |
| 44 FAIL() << "Should not get hint buffer size."; | |
| 45 } | |
| 46 | |
| 47 void SyncerCommandTestBase::OnShouldStopSyncingPermanently() { | |
| 48 FAIL() << "Shouldn't be called."; | |
| 49 } | |
| 50 | |
| 51 void SyncerCommandTestBase::OnSyncProtocolError( | |
| 52 const sessions::SyncSessionSnapshot& session) { | |
| 53 return; | |
| 54 } | |
| 55 SyncerCommandTestBase::SyncerCommandTestBase() | |
| 56 : traffic_recorder_(kMaxMessages, kMaxMessageSize) { | |
| 57 } | |
| 58 | |
| 59 SyncerCommandTestBase::~SyncerCommandTestBase() { | |
| 60 } | |
| 61 | |
| 62 void SyncerCommandTestBase::SetUp() { | |
| 63 extensions_activity_ = new ExtensionsActivity(); | |
| 64 | |
| 65 // The session always expects there to be a passive worker. | |
| 66 workers()->push_back( | |
| 67 make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE))); | |
| 68 ResetContext(); | |
| 69 } | |
| 70 | |
| 71 void SyncerCommandTestBase::TearDown() { | |
| 72 } | |
| 73 | |
| 74 syncable::Directory* SyncerCommandTest::directory() { | |
| 75 return dir_maker_.directory(); | |
| 76 } | |
| 77 | |
| 78 void SyncerCommandTest::SetUp() { | |
| 79 dir_maker_.SetUp(); | |
| 80 SyncerCommandTestBase::SetUp(); | |
| 81 } | |
| 82 | |
| 83 void SyncerCommandTest::TearDown() { | |
| 84 dir_maker_.TearDown(); | |
| 85 } | |
| 86 | |
| 87 } // namespace syncer | |
| OLD | NEW |