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

Unified Diff: extensions/common/features/complex_feature_unittest.cc

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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 | « extensions/common/features/complex_feature.cc ('k') | extensions/common/features/feature_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/complex_feature_unittest.cc
diff --git a/extensions/common/features/complex_feature_unittest.cc b/extensions/common/features/complex_feature_unittest.cc
index f60c90026a943c4f9fa016a6cad9e8951f6a6e42..bff752dd8549a7fea88840bd04d8c2a6b06b77d0 100644
--- a/extensions/common/features/complex_feature_unittest.cc
+++ b/extensions/common/features/complex_feature_unittest.cc
@@ -17,12 +17,12 @@ namespace extensions {
TEST(ComplexFeatureTest, MultipleRulesWhitelist) {
const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh");
const std::string kIdBar("barabbbbccccddddeeeeffffgggghhhh");
- scoped_ptr<ComplexFeature::FeatureList> features(
+ std::unique_ptr<ComplexFeature::FeatureList> features(
new ComplexFeature::FeatureList());
// Rule: "extension", whitelist "foo".
- scoped_ptr<SimpleFeature> simple_feature(new SimpleFeature);
- scoped_ptr<base::DictionaryValue> rule(
+ std::unique_ptr<SimpleFeature> simple_feature(new SimpleFeature);
+ std::unique_ptr<base::DictionaryValue> rule(
DictionaryBuilder()
.Set("whitelist", ListBuilder().Append(kIdFoo).Build())
.Set("extension_types", ListBuilder().Append("extension").Build())
@@ -40,7 +40,8 @@ TEST(ComplexFeatureTest, MultipleRulesWhitelist) {
simple_feature->Parse(rule.get());
features->push_back(std::move(simple_feature));
- scoped_ptr<ComplexFeature> feature(new ComplexFeature(std::move(features)));
+ std::unique_ptr<ComplexFeature> feature(
+ new ComplexFeature(std::move(features)));
// Test match 1st rule.
EXPECT_EQ(
@@ -79,12 +80,12 @@ TEST(ComplexFeatureTest, MultipleRulesWhitelist) {
// Tests that dependencies are correctly checked.
TEST(ComplexFeatureTest, Dependencies) {
- scoped_ptr<ComplexFeature::FeatureList> features(
+ std::unique_ptr<ComplexFeature::FeatureList> features(
new ComplexFeature::FeatureList());
// Rule which depends on an extension-only feature (content_security_policy).
- scoped_ptr<SimpleFeature> simple_feature(new SimpleFeature);
- scoped_ptr<base::DictionaryValue> rule =
+ std::unique_ptr<SimpleFeature> simple_feature(new SimpleFeature);
+ std::unique_ptr<base::DictionaryValue> rule =
DictionaryBuilder()
.Set("dependencies",
ListBuilder().Append("manifest:content_security_policy").Build())
@@ -101,7 +102,8 @@ TEST(ComplexFeatureTest, Dependencies) {
simple_feature->Parse(rule.get());
features->push_back(std::move(simple_feature));
- scoped_ptr<ComplexFeature> feature(new ComplexFeature(std::move(features)));
+ std::unique_ptr<ComplexFeature> feature(
+ new ComplexFeature(std::move(features)));
// Available to extensions because of the content_security_policy rule.
EXPECT_EQ(
« no previous file with comments | « extensions/common/features/complex_feature.cc ('k') | extensions/common/features/feature_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698