| 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 "components/sync/engine_impl/syncer.h" | 8 #include "components/sync/engine_impl/syncer.h" |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace | 176 } // namespace |
| 177 | 177 |
| 178 class SyncerTest : public testing::Test, | 178 class SyncerTest : public testing::Test, |
| 179 public SyncCycle::Delegate, | 179 public SyncCycle::Delegate, |
| 180 public SyncEngineEventListener { | 180 public SyncEngineEventListener { |
| 181 protected: | 181 protected: |
| 182 SyncerTest() | 182 SyncerTest() |
| 183 : extensions_activity_(new ExtensionsActivity), | 183 : extensions_activity_(new ExtensionsActivity), |
| 184 syncer_(NULL), | 184 syncer_(nullptr), |
| 185 last_client_invalidation_hint_buffer_size_(10) {} | 185 last_client_invalidation_hint_buffer_size_(10) {} |
| 186 | 186 |
| 187 // SyncCycle::Delegate implementation. | 187 // SyncCycle::Delegate implementation. |
| 188 void OnThrottled(const base::TimeDelta& throttle_duration) override { | 188 void OnThrottled(const base::TimeDelta& throttle_duration) override { |
| 189 FAIL() << "Should not get silenced."; | 189 FAIL() << "Should not get silenced."; |
| 190 } | 190 } |
| 191 void OnTypesThrottled(ModelTypeSet types, | 191 void OnTypesThrottled(ModelTypeSet types, |
| 192 const base::TimeDelta& throttle_duration) override { | 192 const base::TimeDelta& throttle_duration) override { |
| 193 scheduler_->OnTypesThrottled(types, throttle_duration); | 193 scheduler_->OnTypesThrottled(types, throttle_duration); |
| 194 } | 194 } |
| (...skipping 5645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5840 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); | 5840 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); |
| 5841 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); | 5841 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); |
| 5842 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); | 5842 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); |
| 5843 } else { | 5843 } else { |
| 5844 EXPECT_TRUE(final_monitor_records.empty()) | 5844 EXPECT_TRUE(final_monitor_records.empty()) |
| 5845 << "Should not restore records after successful bookmark commit."; | 5845 << "Should not restore records after successful bookmark commit."; |
| 5846 } | 5846 } |
| 5847 } | 5847 } |
| 5848 | 5848 |
| 5849 } // namespace syncer | 5849 } // namespace syncer |
| OLD | NEW |