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

Unified Diff: chrome/common/extensions/api/extension_api_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: David's comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/extension_api.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_api_unittest.cc
diff --git a/chrome/common/extensions/api/extension_api_unittest.cc b/chrome/common/extensions/api/extension_api_unittest.cc
index d906c87502ee39208cbc22bea314bce4fa97bbe5..0082e963bf456479ec0963d636a0519f8ddd6db4 100644
--- a/chrome/common/extensions/api/extension_api_unittest.cc
+++ b/chrome/common/extensions/api/extension_api_unittest.cc
@@ -419,7 +419,7 @@ TEST(ExtensionAPI, FeaturesRequireContexts) {
static void GetDictionaryFromList(const DictionaryValue* schema,
const std::string& list_name,
const int list_index,
- DictionaryValue** out) {
+ const DictionaryValue** out) {
const ListValue* list;
EXPECT_TRUE(schema->GetList(list_name, &list));
EXPECT_TRUE(list->GetDictionary(list_index, out));
@@ -442,8 +442,8 @@ TEST(ExtensionAPI, TypesHaveNamespace) {
const DictionaryValue* schema = api.GetSchema("test.foo");
- DictionaryValue* dict;
- DictionaryValue* sub_dict;
+ const DictionaryValue* dict;
+ const DictionaryValue* sub_dict;
std::string type;
GetDictionaryFromList(schema, "types", 0, &dict);
@@ -452,7 +452,7 @@ TEST(ExtensionAPI, TypesHaveNamespace) {
EXPECT_TRUE(dict->GetString("customBindings", &type));
EXPECT_EQ("test.foo.TestType", type);
EXPECT_TRUE(dict->GetDictionary("properties", &sub_dict));
- DictionaryValue* property;
+ const DictionaryValue* property;
EXPECT_TRUE(sub_dict->GetDictionary("foo", &property));
EXPECT_TRUE(property->GetString("$ref", &type));
EXPECT_EQ("test.foo.OtherType", type);
« no previous file with comments | « chrome/common/extensions/api/extension_api.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698