| Index: chrome/common/extensions/features/base_feature_provider_unittest.cc
|
| diff --git a/chrome/common/extensions/features/base_feature_provider_unittest.cc b/chrome/common/extensions/features/base_feature_provider_unittest.cc
|
| index 4b94fb1464bb6ec6d3ff9836cbaab48c5d61c8f9..d9f1b2855976df4bba1bd25367ef48f9267c9c88 100644
|
| --- a/chrome/common/extensions/features/base_feature_provider_unittest.cc
|
| +++ b/chrome/common/extensions/features/base_feature_provider_unittest.cc
|
| @@ -104,9 +104,11 @@ TEST(BaseFeatureProviderTest, Validation) {
|
| scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
|
|
|
| base::DictionaryValue* feature1 = new base::DictionaryValue();
|
| + feature1->SetString("channel", "trunk");
|
| value->Set("feature1", feature1);
|
|
|
| base::DictionaryValue* feature2 = new base::DictionaryValue();
|
| + feature2->SetString("channel", "trunk");
|
| base::ListValue* extension_types = new base::ListValue();
|
| extension_types->Append(new base::StringValue("extension"));
|
| feature2->Set("extension_types", extension_types);
|
| @@ -126,6 +128,11 @@ TEST(BaseFeatureProviderTest, Validation) {
|
| provider.reset(new BaseFeatureProvider(*value, CreatePermissionFeature));
|
| EXPECT_TRUE(provider->GetFeature("feature1"));
|
|
|
| + // Remove the channel, and feature1 won't validate.
|
| + feature1->Remove("channel", NULL);
|
| + provider.reset(new BaseFeatureProvider(*value, CreatePermissionFeature));
|
| + EXPECT_FALSE(provider->GetFeature("feature1"));
|
| +
|
| // feature2 won't validate because of the presence of "contexts".
|
| EXPECT_FALSE(provider->GetFeature("feature2"));
|
|
|
|
|