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

Unified Diff: tools/json_schema_compiler/feature_compiler.py

Issue 2494653005: Support API aliases (Closed)
Patch Set: rebase Created 4 years, 1 month 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/feature_compiler.py
diff --git a/tools/json_schema_compiler/feature_compiler.py b/tools/json_schema_compiler/feature_compiler.py
index 9e0b8fb6883c2a1116e1936c8568e4cc155780c3..42527469db1d9e5d9437851b5b668edf5e6778a6 100644
--- a/tools/json_schema_compiler/feature_compiler.py
+++ b/tools/json_schema_compiler/feature_compiler.py
@@ -102,6 +102,9 @@ CC_FILE_END = """
# an empty definition ({}) is used.
FEATURE_GRAMMAR = (
{
+ 'alias': {
Devlin 2016/11/14 18:03:56 We need to test these. We also need to throw erro
tbarzic 2016/11/15 04:45:07 Done.
+ unicode: {}
+ },
'blacklist': {
list: {'subtype': unicode}
},
@@ -197,6 +200,9 @@ FEATURE_GRAMMAR = (
}
}
},
+ 'source': {
+ unicode: {}
+ },
'whitelist': {
list: {'subtype': unicode}
},
@@ -228,13 +234,26 @@ VALIDATION = ({
'ManifestFeatures must specify at least one extension type'),
(partial(DoesNotHaveProperty, 'contexts'),
'ManifestFeatures do not support contexts.'),
+ (partial(DoesNotHaveProperty, 'alias'),
+ 'ManifestFeatures do not support alias.'),
+ (partial(DoesNotHaveProperty, 'source'),
+ 'ManifestFeatures do not support source.'),
],
- 'BehaviorFeature': [],
+ 'BehaviorFeature': [
+ (partial(DoesNotHaveProperty, 'alias'),
+ 'BehaviorFeatures do not support alias.'),
+ (partial(DoesNotHaveProperty, 'source'),
+ 'BehaviorFeatures do not support source.'),
+ ],
'PermissionFeature': [
(partial(HasProperty, 'extension_types'),
'PermissionFeatures must specify at least one extension type'),
(partial(DoesNotHaveProperty, 'contexts'),
'PermissionFeatures do not support contexts.'),
+ (partial(DoesNotHaveProperty, 'alias'),
+ 'PermissionFeatures do not support alias.'),
+ (partial(DoesNotHaveProperty, 'source'),
+ 'PermissionFeatures do not support source.'),
],
})
« extensions/common/features/feature.h ('K') | « extensions/renderer/script_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698