OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/sync/engine_impl/syncer_util.h" | 5 #include "components/sync/engine_impl/syncer_util.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
11 #include "components/sync/base/unique_position.h" | 11 #include "components/sync/base/unique_position.h" |
12 #include "components/sync/core/test/test_entry_factory.h" | 12 #include "components/sync/engine_impl/test_entry_factory.h" |
13 #include "components/sync/protocol/sync.pb.h" | 13 #include "components/sync/protocol/sync.pb.h" |
14 #include "components/sync/syncable/syncable_write_transaction.h" | 14 #include "components/sync/syncable/syncable_write_transaction.h" |
15 #include "components/sync/test/engine/test_directory_setter_upper.h" | 15 #include "components/sync/test/engine/test_directory_setter_upper.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace syncer { | 18 namespace syncer { |
19 | 19 |
20 class GetUpdatePositionTest : public ::testing::Test { | 20 class GetUpdatePositionTest : public ::testing::Test { |
21 public: | 21 public: |
22 void SetUp() override { | 22 void SetUp() override { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 EXPECT_FALSE(UniquePosition::IsValidSuffix(target.GetUniqueBookmarkTag())); | 219 EXPECT_FALSE(UniquePosition::IsValidSuffix(target.GetUniqueBookmarkTag())); |
220 EXPECT_FALSE(target.GetServerUniquePosition().IsValid()); | 220 EXPECT_FALSE(target.GetServerUniquePosition().IsValid()); |
221 UpdateServerFieldsFromUpdate(&target, invalid_update, "name"); | 221 UpdateServerFieldsFromUpdate(&target, invalid_update, "name"); |
222 | 222 |
223 // After update, target has valid bookmark tag and unique position. | 223 // After update, target has valid bookmark tag and unique position. |
224 EXPECT_TRUE(UniquePosition::IsValidSuffix(target.GetUniqueBookmarkTag())); | 224 EXPECT_TRUE(UniquePosition::IsValidSuffix(target.GetUniqueBookmarkTag())); |
225 EXPECT_TRUE(target.GetServerUniquePosition().IsValid()); | 225 EXPECT_TRUE(target.GetServerUniquePosition().IsValid()); |
226 } | 226 } |
227 | 227 |
228 } // namespace syncer | 228 } // namespace syncer |
OLD | NEW |