| 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/syncable/directory_unittest.h" | 5 #include "components/sync/syncable/directory_unittest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <cstdlib> | 10 #include <cstdlib> |
| (...skipping 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2122 entry.PutUniqueServerTag(ModelTypeToRootTag(PREFERENCES)); | 2122 entry.PutUniqueServerTag(ModelTypeToRootTag(PREFERENCES)); |
| 2123 | 2123 |
| 2124 // Should still be marked as incomplete. | 2124 // Should still be marked as incomplete. |
| 2125 EXPECT_FALSE(dir()->InitialSyncEndedForType(&trans, PREFERENCES)); | 2125 EXPECT_FALSE(dir()->InitialSyncEndedForType(&trans, PREFERENCES)); |
| 2126 | 2126 |
| 2127 // Mark as complete and verify. | 2127 // Mark as complete and verify. |
| 2128 dir()->MarkInitialSyncEndedForType(&trans, PREFERENCES); | 2128 dir()->MarkInitialSyncEndedForType(&trans, PREFERENCES); |
| 2129 EXPECT_TRUE(dir()->InitialSyncEndedForType(&trans, PREFERENCES)); | 2129 EXPECT_TRUE(dir()->InitialSyncEndedForType(&trans, PREFERENCES)); |
| 2130 } | 2130 } |
| 2131 | 2131 |
| 2132 TEST_F(SyncableDirectoryTest, TestGetNodeDetailsForType) { |
| 2133 CreateEntry(BOOKMARKS, "rtc"); |
| 2134 |
| 2135 ReadTransaction trans(FROM_HERE, dir().get()); |
| 2136 std::unique_ptr<base::ListValue> nodes( |
| 2137 dir()->GetNodeDetailsForType(&trans, BOOKMARKS)); |
| 2138 ASSERT_EQ(1U, nodes->GetSize()); |
| 2139 |
| 2140 const base::DictionaryValue* first_result; |
| 2141 ASSERT_TRUE(nodes->GetDictionary(0, &first_result)); |
| 2142 EXPECT_TRUE(first_result->HasKey("ID")); |
| 2143 EXPECT_TRUE(first_result->HasKey("NON_UNIQUE_NAME")); |
| 2144 } |
| 2145 |
| 2132 } // namespace syncable | 2146 } // namespace syncable |
| 2133 | 2147 |
| 2134 } // namespace syncer | 2148 } // namespace syncer |
| OLD | NEW |