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

Unified Diff: net/sdch/sdch_owner_unittest.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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 | « net/sdch/sdch_owner.cc ('k') | net/server/http_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/sdch/sdch_owner_unittest.cc
diff --git a/net/sdch/sdch_owner_unittest.cc b/net/sdch/sdch_owner_unittest.cc
index 788a9929b6f39e9760a4aa835013553aa214df92..1abe682cb4a3ab6cf6caaf909c9ae21820c8ea65 100644
--- a/net/sdch/sdch_owner_unittest.cc
+++ b/net/sdch/sdch_owner_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <utility>
+
#include "base/memory/memory_pressure_listener.h"
#include "base/prefs/testing_pref_store.h"
#include "base/run_loop.h"
@@ -774,7 +776,7 @@ TEST_F(SdchOwnerPersistenceTest, Empty) {
// Test a persistence store with an empty dictionary.
TEST_F(SdchOwnerPersistenceTest, Persistent_EmptyDict) {
- pref_store_->SetValue("SDCH", new base::DictionaryValue(),
+ pref_store_->SetValue("SDCH", make_scoped_ptr(new base::DictionaryValue()),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
ResetOwner(false);
EXPECT_EQ(0, owner_->GetDictionaryCountForTesting());
@@ -782,9 +784,9 @@ TEST_F(SdchOwnerPersistenceTest, Persistent_EmptyDict) {
// Test a persistence store with a bad version number.
TEST_F(SdchOwnerPersistenceTest, Persistent_BadVersion) {
- base::DictionaryValue* sdch_dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> sdch_dict(new base::DictionaryValue());
sdch_dict->SetInteger("version", 2);
- pref_store_->SetValue("SDCH", sdch_dict,
+ pref_store_->SetValue("SDCH", std::move(sdch_dict),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
ResetOwner(false);
@@ -793,11 +795,11 @@ TEST_F(SdchOwnerPersistenceTest, Persistent_BadVersion) {
// Test a persistence store with an empty dictionaries map.
TEST_F(SdchOwnerPersistenceTest, Persistent_EmptyDictList) {
- base::DictionaryValue* sdch_dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> sdch_dict(new base::DictionaryValue());
scoped_ptr<base::DictionaryValue> dicts(new base::DictionaryValue());
sdch_dict->SetInteger("version", 1);
sdch_dict->Set("dictionaries", dicts.Pass());
- pref_store_->SetValue("SDCH", sdch_dict,
+ pref_store_->SetValue("SDCH", std::move(sdch_dict),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
ResetOwner(false);
« no previous file with comments | « net/sdch/sdch_owner.cc ('k') | net/server/http_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698