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

Unified Diff: extensions/common/file_util_unittest.cc

Issue 2899743002: Remove raw base::DictionaryValue::Set in //extensions (Closed)
Patch Set: Addressed nit Created 3 years, 6 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: extensions/common/file_util_unittest.cc
diff --git a/extensions/common/file_util_unittest.cc b/extensions/common/file_util_unittest.cc
index c1bba3337747a0caf657f7c378944eeb6d5376e7..40cb982af8dd9dccb439ff9ef2f5916a1293f149 100644
--- a/extensions/common/file_util_unittest.cc
+++ b/extensions/common/file_util_unittest.cc
@@ -12,9 +12,11 @@
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_string_value_serializer.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/values.h"
#include "build/build_config.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
@@ -290,9 +292,9 @@ TEST_F(FileUtilTest, BackgroundScriptsMustExist) {
value->SetString("version", "1");
value->SetInteger("manifest_version", 1);
- base::ListValue* scripts = new base::ListValue();
+ base::ListValue* scripts =
+ value->SetList("background.scripts", base::MakeUnique<base::ListValue>());
scripts->AppendString("foo.js");
- value->Set("background.scripts", scripts);
std::string error;
std::vector<extensions::InstallWarning> warnings;
« no previous file with comments | « extensions/common/extension_set_unittest.cc ('k') | extensions/common/manifest_handlers/oauth2_manifest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698