| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "sync/engine/worker_entity_tracker.h" | 6 #include "components/sync/engine_impl/worker_entity_tracker.h" |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "sync/internal_api/public/base/model_type.h" | 13 #include "components/sync/base/model_type.h" |
| 14 #include "sync/internal_api/public/non_blocking_sync_common.h" | 14 #include "components/sync/base/time.h" |
| 15 #include "sync/syncable/syncable_util.h" | 15 #include "components/sync/core/non_blocking_sync_common.h" |
| 16 #include "sync/util/time.h" | 16 #include "components/sync/syncable/syncable_util.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 namespace syncer_v2 { | 19 namespace syncer_v2 { |
| 20 | 20 |
| 21 // Some simple tests for the WorkerEntityTracker. | 21 // Some simple tests for the WorkerEntityTracker. |
| 22 // | 22 // |
| 23 // The WorkerEntityTracker is an implementation detail of the ModelTypeWorker. | 23 // The WorkerEntityTracker is an implementation detail of the ModelTypeWorker. |
| 24 // As such, it doesn't make much sense to test it exhaustively, since it | 24 // As such, it doesn't make much sense to test it exhaustively, since it |
| 25 // already gets a lot of test coverage from the ModelTypeWorker unit tests. | 25 // already gets a lot of test coverage from the ModelTypeWorker unit tests. |
| 26 // | 26 // |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 CommitRequestData data = MakeCommitRequestData(22, 33); | 154 CommitRequestData data = MakeCommitRequestData(22, 33); |
| 155 entity_->RequestCommit(data); | 155 entity_->RequestCommit(data); |
| 156 | 156 |
| 157 EXPECT_TRUE(entity_->HasPendingCommit()); | 157 EXPECT_TRUE(entity_->HasPendingCommit()); |
| 158 | 158 |
| 159 entity_->ReceiveUpdate(33); // Version 33 == 33. | 159 entity_->ReceiveUpdate(33); // Version 33 == 33. |
| 160 EXPECT_TRUE(entity_->HasPendingCommit()); | 160 EXPECT_TRUE(entity_->HasPendingCommit()); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace syncer_v2 | 163 } // namespace syncer_v2 |
| OLD | NEW |