| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Syncer unit tests. Unfortunately a lot of these tests | 5 // Syncer unit tests. Unfortunately a lot of these tests |
| 6 // are outdated and need to be reworked and updated. | 6 // are outdated and need to be reworked and updated. |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 last_short_poll_interval_received_ = new_interval; | 141 last_short_poll_interval_received_ = new_interval; |
| 142 } | 142 } |
| 143 virtual void OnReceivedSessionsCommitDelay( | 143 virtual void OnReceivedSessionsCommitDelay( |
| 144 const base::TimeDelta& new_delay) OVERRIDE { | 144 const base::TimeDelta& new_delay) OVERRIDE { |
| 145 last_sessions_commit_delay_seconds_ = new_delay; | 145 last_sessions_commit_delay_seconds_ = new_delay; |
| 146 } | 146 } |
| 147 virtual void OnReceivedClientInvalidationHintBufferSize( | 147 virtual void OnReceivedClientInvalidationHintBufferSize( |
| 148 int size) OVERRIDE { | 148 int size) OVERRIDE { |
| 149 last_client_invalidation_hint_buffer_size_ = size; | 149 last_client_invalidation_hint_buffer_size_ = size; |
| 150 } | 150 } |
| 151 virtual void OnShouldStopSyncingPermanently() OVERRIDE { | |
| 152 } | |
| 153 virtual void OnSyncProtocolError( | 151 virtual void OnSyncProtocolError( |
| 154 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE { | 152 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE { |
| 155 } | 153 } |
| 156 | 154 |
| 157 void GetWorkers(std::vector<ModelSafeWorker*>* out) { | 155 void GetWorkers(std::vector<ModelSafeWorker*>* out) { |
| 158 out->push_back(worker_.get()); | 156 out->push_back(worker_.get()); |
| 159 } | 157 } |
| 160 | 158 |
| 161 void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) { | 159 void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) { |
| 162 // We're just testing the sync engine here, so we shunt everything to | 160 // We're just testing the sync engine here, so we shunt everything to |
| (...skipping 4497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4660 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); | 4658 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); |
| 4661 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); | 4659 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); |
| 4662 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); | 4660 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); |
| 4663 } else { | 4661 } else { |
| 4664 EXPECT_TRUE(final_monitor_records.empty()) | 4662 EXPECT_TRUE(final_monitor_records.empty()) |
| 4665 << "Should not restore records after successful bookmark commit."; | 4663 << "Should not restore records after successful bookmark commit."; |
| 4666 } | 4664 } |
| 4667 } | 4665 } |
| 4668 | 4666 |
| 4669 } // namespace syncer | 4667 } // namespace syncer |
| OLD | NEW |