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

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

Issue 789383002: Add the basic infrastructure for the Behavior feature type: BehaviorFeature and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flag-features
Patch Set: rebase Created 6 years 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/simple_feature.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/simple_feature_unittest.cc
diff --git a/extensions/common/features/simple_feature_unittest.cc b/extensions/common/features/simple_feature_unittest.cc
index 9f723fab0663d23e8a49bad83c792fcf0e0039f1..dce57404db216e06cd2d40bc388b63d796fdc8d4 100644
--- a/extensions/common/features/simple_feature_unittest.cc
+++ b/extensions/common/features/simple_feature_unittest.cc
@@ -380,6 +380,8 @@ TEST(SimpleFeatureTest, Location) {
// Component extensions can access any location.
EXPECT_TRUE(LocationIsAvailable(SimpleFeature::COMPONENT_LOCATION,
Manifest::COMPONENT));
+ EXPECT_TRUE(LocationIsAvailable(SimpleFeature::EXTERNAL_COMPONENT_LOCATION,
+ Manifest::COMPONENT));
EXPECT_TRUE(
LocationIsAvailable(SimpleFeature::POLICY_LOCATION, Manifest::COMPONENT));
EXPECT_TRUE(LocationIsAvailable(SimpleFeature::UNSPECIFIED_LOCATION,
@@ -391,6 +393,8 @@ TEST(SimpleFeatureTest, Location) {
EXPECT_FALSE(LocationIsAvailable(SimpleFeature::COMPONENT_LOCATION,
Manifest::UNPACKED));
EXPECT_FALSE(LocationIsAvailable(SimpleFeature::COMPONENT_LOCATION,
+ Manifest::EXTERNAL_COMPONENT));
+ EXPECT_FALSE(LocationIsAvailable(SimpleFeature::COMPONENT_LOCATION,
Manifest::EXTERNAL_PREF_DOWNLOAD));
EXPECT_FALSE(LocationIsAvailable(SimpleFeature::COMPONENT_LOCATION,
Manifest::EXTERNAL_POLICY));
@@ -405,11 +409,18 @@ TEST(SimpleFeatureTest, Location) {
// Non-policy (except component) extensions cannot access policy.
EXPECT_FALSE(LocationIsAvailable(SimpleFeature::POLICY_LOCATION,
+ Manifest::EXTERNAL_COMPONENT));
+ EXPECT_FALSE(LocationIsAvailable(SimpleFeature::POLICY_LOCATION,
Manifest::INVALID_LOCATION));
EXPECT_FALSE(
LocationIsAvailable(SimpleFeature::POLICY_LOCATION, Manifest::UNPACKED));
EXPECT_FALSE(LocationIsAvailable(SimpleFeature::POLICY_LOCATION,
Manifest::EXTERNAL_PREF_DOWNLOAD));
+
+ // External component extensions can access the "external_component"
+ // location.
+ EXPECT_TRUE(LocationIsAvailable(SimpleFeature::EXTERNAL_COMPONENT_LOCATION,
+ Manifest::EXTERNAL_COMPONENT));
}
TEST(SimpleFeatureTest, Platform) {
« no previous file with comments | « extensions/common/features/simple_feature.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698