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

Side by Side Diff: sync/internal_api/syncapi_unittest.cc

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 years, 4 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « sync/internal_api/public/change_record_unittest.cc ('k') | sync/protocol/proto_value_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698