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 "sync/internal_api/sync_rollback_manager_base.h" | 5 #include "sync/internal_api/sync_rollback_manager_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "sync/internal_api/public/read_node.h" | 8 #include "sync/internal_api/public/read_node.h" |
9 #include "sync/internal_api/public/read_transaction.h" | 9 #include "sync/internal_api/public/read_transaction.h" |
10 #include "sync/internal_api/public/test/test_internal_components_factory.h" | 10 #include "sync/internal_api/public/test/test_internal_components_factory.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 manager_.ConfigureSyncer( | 42 manager_.ConfigureSyncer( |
43 CONFIGURE_REASON_NEW_CLIENT, | 43 CONFIGURE_REASON_NEW_CLIENT, |
44 ModelTypeSet(PREFERENCES, BOOKMARKS), | 44 ModelTypeSet(PREFERENCES, BOOKMARKS), |
45 ModelTypeSet(), ModelTypeSet(), ModelTypeSet(), ModelSafeRoutingInfo(), | 45 ModelTypeSet(), ModelTypeSet(), ModelTypeSet(), ModelSafeRoutingInfo(), |
46 base::Bind(&OnConfigDone, true), | 46 base::Bind(&OnConfigDone, true), |
47 base::Bind(&OnConfigDone, false)); | 47 base::Bind(&OnConfigDone, false)); |
48 | 48 |
49 ReadTransaction trans(FROM_HERE, manager_.GetUserShare()); | 49 ReadTransaction trans(FROM_HERE, manager_.GetUserShare()); |
50 ReadNode pref_root(&trans); | 50 ReadNode pref_root(&trans); |
51 EXPECT_EQ(BaseNode::INIT_OK, | 51 EXPECT_EQ(BaseNode::INIT_OK, |
52 pref_root.InitByTagLookup(ModelTypeToRootTag(PREFERENCES))); | 52 pref_root.InitTypeRoot(PREFERENCES)); |
53 | 53 |
54 ReadNode bookmark_root(&trans); | 54 ReadNode bookmark_root(&trans); |
55 EXPECT_EQ(BaseNode::INIT_OK, | 55 EXPECT_EQ(BaseNode::INIT_OK, |
56 bookmark_root.InitByTagLookup(ModelTypeToRootTag(BOOKMARKS))); | 56 bookmark_root.InitTypeRoot(BOOKMARKS)); |
57 ReadNode bookmark_bar(&trans); | 57 ReadNode bookmark_bar(&trans); |
58 EXPECT_EQ(BaseNode::INIT_OK, | 58 EXPECT_EQ(BaseNode::INIT_OK, |
59 bookmark_bar.InitByTagLookup("bookmark_bar")); | 59 bookmark_bar.InitByTagLookupForBookmarks("bookmark_bar")); |
60 ReadNode bookmark_mobile(&trans); | 60 ReadNode bookmark_mobile(&trans); |
61 EXPECT_EQ(BaseNode::INIT_OK, | 61 EXPECT_EQ(BaseNode::INIT_OK, |
62 bookmark_mobile.InitByTagLookup("synced_bookmarks")); | 62 bookmark_mobile.InitByTagLookupForBookmarks("synced_bookmarks")); |
63 ReadNode bookmark_other(&trans); | 63 ReadNode bookmark_other(&trans); |
64 EXPECT_EQ(BaseNode::INIT_OK, | 64 EXPECT_EQ(BaseNode::INIT_OK, |
65 bookmark_other.InitByTagLookup("other_bookmarks")); | 65 bookmark_other.InitByTagLookupForBookmarks("other_bookmarks")); |
66 } | 66 } |
67 | 67 |
68 } // anonymous namespace | 68 } // anonymous namespace |
69 | 69 |
70 } // namespace syncer | 70 } // namespace syncer |
OLD | NEW |