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

Unified Diff: base/test/values_test_util.cc

Issue 2889163002: Remove raw DictionaryValue::Set in //components (Closed)
Patch Set: Nits Created 3 years, 7 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 | « base/test/values_test_util.h ('k') | chrome/browser/bookmarks/bookmark_html_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/values_test_util.cc
diff --git a/base/test/values_test_util.cc b/base/test/values_test_util.cc
index 0cd8ea29f6680d040328d5e40e8ea8e0c0682a00..9334df492cb46f3b51fbafcc9f4e2969a74483b8 100644
--- a/base/test/values_test_util.cc
+++ b/base/test/values_test_util.cc
@@ -54,11 +54,9 @@ void ExpectDictStringValue(const std::string& expected_value,
EXPECT_EQ(expected_value, string_value) << key;
}
-void ExpectStringValue(const std::string& expected_str, Value* actual) {
- std::unique_ptr<Value> scoped_actual(actual);
- std::string actual_str;
- EXPECT_TRUE(scoped_actual->GetAsString(&actual_str));
- EXPECT_EQ(expected_str, actual_str);
+void ExpectStringValue(const std::string& expected_str, const Value& actual) {
+ EXPECT_EQ(Value::Type::STRING, actual.type());
+ EXPECT_EQ(expected_str, actual.GetString());
}
namespace test {
« no previous file with comments | « base/test/values_test_util.h ('k') | chrome/browser/bookmarks/bookmark_html_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698