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

Unified Diff: tools/json_schema_compiler/test/features_generation_unittest.cc

Issue 2202733003: [Extensions] Remove JSONFeatureProvider, SimpleFeature::Parse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lei's Created 4 years, 4 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: tools/json_schema_compiler/test/features_generation_unittest.cc
diff --git a/tools/json_schema_compiler/test/features_generation_unittest.cc b/tools/json_schema_compiler/test/features_generation_unittest.cc
index 0eefa6dce28e4760cc7026027f9aad3867d826f9..25f6bcc478bf57de3d730b260d56249c3ff3ad3a 100644
--- a/tools/json_schema_compiler/test/features_generation_unittest.cc
+++ b/tools/json_schema_compiler/test/features_generation_unittest.cc
@@ -106,6 +106,7 @@ TEST(FeaturesGenerationTest, FeaturesTest) {
comparator.contexts = {Feature::BLESSED_EXTENSION_CONTEXT};
comparator.channel.reset(
new version_info::Channel(version_info::Channel::STABLE));
+ comparator.max_manifest_version = 1;
comparator.CompareFeature(feature);
}
{
@@ -116,6 +117,7 @@ TEST(FeaturesGenerationTest, FeaturesTest) {
new version_info::Channel(version_info::Channel::DEV));
comparator.extension_types = {Manifest::TYPE_EXTENSION,
Manifest::TYPE_PLATFORM_APP};
+ comparator.location = SimpleFeature::COMPONENT_LOCATION;
comparator.whitelist = {"aaa", "bbb"};
comparator.blacklist = {"zzz", "yyy"};
comparator.component_extensions_auto_granted = false;
@@ -174,6 +176,23 @@ TEST(FeaturesGenerationTest, FeaturesTest) {
new version_info::Channel(version_info::Channel::DEV));
comparator.matches.AddPattern(
URLPattern(URLPattern::SCHEME_ALL, "*://example.com/*"));
+ comparator.min_manifest_version = 2;
+ comparator.CompareFeature(feature);
+ }
+ {
+ APIFeature* feature = GetAPIFeature("allEnum");
+ FeatureComparator comparator("allEnum");
+ comparator.contexts = {
+ Feature::BLESSED_EXTENSION_CONTEXT, Feature::BLESSED_WEB_PAGE_CONTEXT,
+ Feature::CONTENT_SCRIPT_CONTEXT, Feature::SERVICE_WORKER_CONTEXT,
+ Feature::WEB_PAGE_CONTEXT, Feature::WEBUI_CONTEXT,
+ Feature::UNBLESSED_EXTENSION_CONTEXT};
+ comparator.extension_types = {
+ Manifest::TYPE_EXTENSION, Manifest::TYPE_HOSTED_APP,
+ Manifest::TYPE_LEGACY_PACKAGED_APP, Manifest::TYPE_PLATFORM_APP,
+ Manifest::TYPE_SHARED_MODULE, Manifest::TYPE_THEME};
+ comparator.channel.reset(
+ new version_info::Channel(version_info::Channel::BETA));
comparator.CompareFeature(feature);
}
{
« no previous file with comments | « tools/json_schema_compiler/feature_compiler_test.py ('k') | tools/json_schema_compiler/test/features_test.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698