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

Unified Diff: sync/internal_api/syncapi_unittest.cc

Issue 10837044: Correct const accessors in base/values.(h|cc), Part II (ListValue) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/syncapi_unittest.cc
diff --git a/sync/internal_api/syncapi_unittest.cc b/sync/internal_api/syncapi_unittest.cc
index 58c83c2a3f2b7bb7bb7d637031620baab61458fa..5d66264a11b58bdf9eb8a41b0a30a1ecd89b0238 100644
--- a/sync/internal_api/syncapi_unittest.cc
+++ b/sync/internal_api/syncapi_unittest.cc
@@ -995,7 +995,7 @@ TEST_F(SyncManagerTest, ProcessJsMessageGetRootNodeDetails) {
SendJsMessage("getRootNodeDetails", kNoArgs, reply_handler.AsWeakHandle());
EXPECT_EQ(1u, return_args.Get().GetSize());
- DictionaryValue* node_info = NULL;
+ const DictionaryValue* node_info = NULL;
EXPECT_TRUE(return_args.Get().GetDictionary(0, &node_info));
if (node_info) {
ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
@@ -1012,11 +1012,11 @@ void CheckGetNodesByIdReturnArgs(SyncManager* sync_manager,
int64 id,
bool is_detailed) {
EXPECT_EQ(1u, return_args.Get().GetSize());
- ListValue* nodes = NULL;
+ const ListValue* nodes = NULL;
ASSERT_TRUE(return_args.Get().GetList(0, &nodes));
ASSERT_TRUE(nodes);
EXPECT_EQ(1u, nodes->GetSize());
- DictionaryValue* node_info = NULL;
+ const DictionaryValue* node_info = NULL;
EXPECT_TRUE(nodes->GetDictionary(0, &node_info));
ASSERT_TRUE(node_info);
ReadTransaction trans(FROM_HERE, sync_manager->GetUserShare());
@@ -1159,7 +1159,7 @@ TEST_F(SyncManagerTest, GetChildNodeIds) {
}
EXPECT_EQ(1u, return_args.Get().GetSize());
- ListValue* nodes = NULL;
+ const ListValue* nodes = NULL;
ASSERT_TRUE(return_args.Get().GetList(0, &nodes));
ASSERT_TRUE(nodes);
EXPECT_EQ(6u, nodes->GetSize());
@@ -1233,8 +1233,8 @@ TEST_F(SyncManagerTest, GetAllNodesTest) {
// would make this test brittle without greatly increasing our chances of
// catching real bugs.
- ListValue* node_list;
- DictionaryValue* first_result;
+ const ListValue* node_list;
+ const DictionaryValue* first_result;
// The resulting argument list should have one argument, a list of nodes.
ASSERT_EQ(1U, return_args.Get().GetSize());

Powered by Google App Engine
This is Rietveld 408576698