| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/syncable/parent_child_index.h" | 5 #include "components/sync/syncable/parent_child_index.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "components/sync/syncable/entry_kernel.h" | 11 #include "components/sync/syncable/entry_kernel.h" |
| 12 #include "components/sync/syncable/syncable_util.h" | 12 #include "components/sync/syncable/syncable_util.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| 16 namespace syncable { | 16 namespace syncable { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 static const std::string kCacheGuid = "8HhNIHlEOCGQbIAALr9QEg=="; | 20 const char kCacheGuid[] = "8HhNIHlEOCGQbIAALr9QEg=="; |
| 21 | 21 |
| 22 } // namespace | 22 } // namespace |
| 23 | 23 |
| 24 class ParentChildIndexTest : public testing::Test { | 24 class ParentChildIndexTest : public testing::Test { |
| 25 public: | 25 public: |
| 26 void TearDown() override {} | 26 void TearDown() override {} |
| 27 | 27 |
| 28 // Unfortunately, we can't use the regular Entry factory methods, because the | 28 // Unfortunately, we can't use the regular Entry factory methods, because the |
| 29 // ParentChildIndex deals in EntryKernels. | 29 // ParentChildIndex deals in EntryKernels. |
| 30 | 30 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 const OrderedChildSet* children = index_.GetChildren(type_root_id); | 510 const OrderedChildSet* children = index_.GetChildren(type_root_id); |
| 511 ASSERT_TRUE(children); | 511 ASSERT_TRUE(children); |
| 512 EXPECT_EQ(2UL, children->size()); | 512 EXPECT_EQ(2UL, children->size()); |
| 513 const OrderedChildSet* children_bad = index_.GetChildren(bad_type_root_id); | 513 const OrderedChildSet* children_bad = index_.GetChildren(bad_type_root_id); |
| 514 ASSERT_TRUE(children_bad); | 514 ASSERT_TRUE(children_bad); |
| 515 EXPECT_EQ(2UL, children_bad->size()); | 515 EXPECT_EQ(2UL, children_bad->size()); |
| 516 } | 516 } |
| 517 | 517 |
| 518 } // namespace syncable | 518 } // namespace syncable |
| 519 } // namespace syncer | 519 } // namespace syncer |
| OLD | NEW |