Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: components/sync/syncable/directory_unittest.cc

Issue 2276943006: [USS] Move GetAllNodes from backend to controller (Closed)
Patch Set: update for Max Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/sync/driver/ui_data_type_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/sync/driver/ui_data_type_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698