| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Unit tests for the SyncApi. Note that a lot of the underlying | 5 // Unit tests for the SyncApi. Note that a lot of the underlying |
| 6 // functionality is provided by the Syncable layer, which has its own | 6 // functionality is provided by the Syncable layer, which has its own |
| 7 // unit tests. We'll test SyncApi specific things in this harness. | 7 // unit tests. We'll test SyncApi specific things in this harness. |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 } | 577 } |
| 578 if (is_detailed) { | 578 if (is_detailed) { |
| 579 ExpectInt64Value(node.GetParentId(), value, "parentId"); | 579 ExpectInt64Value(node.GetParentId(), value, "parentId"); |
| 580 ExpectTimeValue(node.GetModificationTime(), value, "modificationTime"); | 580 ExpectTimeValue(node.GetModificationTime(), value, "modificationTime"); |
| 581 ExpectInt64Value(node.GetExternalId(), value, "externalId"); | 581 ExpectInt64Value(node.GetExternalId(), value, "externalId"); |
| 582 ExpectInt64Value(node.GetPredecessorId(), value, "predecessorId"); | 582 ExpectInt64Value(node.GetPredecessorId(), value, "predecessorId"); |
| 583 ExpectInt64Value(node.GetSuccessorId(), value, "successorId"); | 583 ExpectInt64Value(node.GetSuccessorId(), value, "successorId"); |
| 584 ExpectInt64Value(node.GetFirstChildId(), value, "firstChildId"); | 584 ExpectInt64Value(node.GetFirstChildId(), value, "firstChildId"); |
| 585 { | 585 { |
| 586 scoped_ptr<DictionaryValue> expected_entry(node.GetEntry()->ToValue()); | 586 scoped_ptr<DictionaryValue> expected_entry(node.GetEntry()->ToValue()); |
| 587 Value* entry = NULL; | 587 const Value* entry = NULL; |
| 588 EXPECT_TRUE(value.Get("entry", &entry)); | 588 EXPECT_TRUE(value.Get("entry", &entry)); |
| 589 EXPECT_TRUE(Value::Equals(entry, expected_entry.get())); | 589 EXPECT_TRUE(Value::Equals(entry, expected_entry.get())); |
| 590 } | 590 } |
| 591 EXPECT_EQ(11u, value.size()); | 591 EXPECT_EQ(11u, value.size()); |
| 592 } else { | 592 } else { |
| 593 EXPECT_EQ(4u, value.size()); | 593 EXPECT_EQ(4u, value.size()); |
| 594 } | 594 } |
| 595 } | 595 } |
| 596 | 596 |
| 597 } // namespace | 597 } // namespace |
| (...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2621 // Ensure only bookmarks and nigori lost their progress marker. Preferences | 2621 // Ensure only bookmarks and nigori lost their progress marker. Preferences |
| 2622 // should still have it. | 2622 // should still have it. |
| 2623 partial_types = | 2623 partial_types = |
| 2624 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()); | 2624 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()); |
| 2625 EXPECT_TRUE(partial_types.Has(NIGORI)); | 2625 EXPECT_TRUE(partial_types.Has(NIGORI)); |
| 2626 EXPECT_TRUE(partial_types.Has(BOOKMARKS)); | 2626 EXPECT_TRUE(partial_types.Has(BOOKMARKS)); |
| 2627 EXPECT_FALSE(partial_types.Has(PREFERENCES)); | 2627 EXPECT_FALSE(partial_types.Has(PREFERENCES)); |
| 2628 } | 2628 } |
| 2629 | 2629 |
| 2630 } // namespace | 2630 } // namespace |
| OLD | NEW |