Merge pull request #41 from mstriemer/precompile-1087653
Allow precompile in manifests
This commit is contained in:
Коммит
2c8b3d4964
|
@ -123,7 +123,7 @@ class WebappSpec(Spec):
|
|||
"orientation", "fullscreen", "appcache_path",
|
||||
"type", "activities", "permissions", "csp",
|
||||
"messages", "origin", "redirects",
|
||||
"permissions", "chrome", "inputs", "role"],
|
||||
"chrome", "inputs", "role", "precompile"],
|
||||
"allowed_nodes": [],
|
||||
"disallowed_nodes": ["widget"],
|
||||
"child_nodes": {
|
||||
|
@ -231,6 +231,9 @@ class WebappSpec(Spec):
|
|||
},
|
||||
"process": lambda s: s.process_permissions
|
||||
},
|
||||
"precompile": {
|
||||
"expected_type": list,
|
||||
},
|
||||
"csp": {"expected_type": types.StringTypes,
|
||||
"not_empty": True},
|
||||
"messages": {
|
||||
|
|
|
@ -95,6 +95,10 @@ class WebappBaseTestCase(TestCase):
|
|||
"orientation": "landscape",
|
||||
"fullscreen": "true",
|
||||
"type": "web",
|
||||
"precompile": [
|
||||
"game.js",
|
||||
"database.js"
|
||||
],
|
||||
}
|
||||
|
||||
self.resources = [("app_type", "web")]
|
||||
|
@ -1018,3 +1022,9 @@ class TestWebapps(WebappBaseTestCase):
|
|||
self.data["chrome"] = []
|
||||
self.analyze()
|
||||
self.assert_failed(with_errors=True)
|
||||
|
||||
def test_precompile_wrong_format(self):
|
||||
# "precompile" should be list of files not this weird dict.
|
||||
self.data["precompile"] = {"foo.js": True}
|
||||
self.analyze()
|
||||
self.assert_failed(with_errors=True)
|
||||
|
|
Загрузка…
Ссылка в новой задаче