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 "components/sync/engine_impl/worker_entity_tracker.h" | 6 #include "components/sync/engine_impl/worker_entity_tracker.h" |
7 | 7 |
8 #include <stdint.h> | |
9 | |
10 #include <memory> | |
11 | |
12 #include "base/time/time.h" | |
13 #include "components/sync/base/model_type.h" | 8 #include "components/sync/base/model_type.h" |
14 #include "components/sync/base/time.h" | 9 #include "components/sync/base/time.h" |
15 #include "components/sync/core/non_blocking_sync_common.h" | |
16 #include "components/sync/syncable/syncable_util.h" | 10 #include "components/sync/syncable/syncable_util.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
18 | 12 |
19 namespace syncer { | 13 namespace syncer { |
20 | 14 |
21 // Some simple tests for the WorkerEntityTracker. | 15 // Some simple tests for the WorkerEntityTracker. |
22 // | 16 // |
23 // The WorkerEntityTracker is an implementation detail of the ModelTypeWorker. | 17 // The WorkerEntityTracker is an implementation detail of the ModelTypeWorker. |
24 // As such, it doesn't make much sense to test it exhaustively, since it | 18 // 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. | 19 // already gets a lot of test coverage from the ModelTypeWorker unit tests. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 ack.id = kServerId; | 172 ack.id = kServerId; |
179 entity_->ReceiveCommitResponse(&ack); | 173 entity_->ReceiveCommitResponse(&ack); |
180 | 174 |
181 entity_->RequestCommit(MakeCommitRequestData(1, kLocalBaseVersion)); | 175 entity_->RequestCommit(MakeCommitRequestData(1, kLocalBaseVersion)); |
182 sync_pb::SyncEntity pb_entity; | 176 sync_pb::SyncEntity pb_entity; |
183 entity_->PopulateCommitProto(&pb_entity); | 177 entity_->PopulateCommitProto(&pb_entity); |
184 EXPECT_EQ(kCommitResponseVersion, pb_entity.version()); | 178 EXPECT_EQ(kCommitResponseVersion, pb_entity.version()); |
185 } | 179 } |
186 | 180 |
187 } // namespace syncer | 181 } // namespace syncer |
OLD | NEW |