Add support for "csp" elements (bug 807304)
This commit is contained in:
Родитель
281c869011
Коммит
814aa57c3e
|
@ -39,7 +39,7 @@ class WebappSpec(Spec):
|
|||
"default_locale", "installs_allowed_from",
|
||||
"version", "screen_size", "required_features",
|
||||
"orientation", "fullscreen", "appcache_path",
|
||||
"type", "activities", "permissions"],
|
||||
"type", "activities", "permissions", "csp"],
|
||||
"allowed_nodes": ["developer"],
|
||||
"disallowed_nodes": ["widget"],
|
||||
"child_nodes": {
|
||||
|
@ -143,7 +143,9 @@ class WebappSpec(Spec):
|
|||
}
|
||||
},
|
||||
"process": lambda s: s.process_permissions
|
||||
}
|
||||
},
|
||||
"csp": {"expected_type": types.StringTypes,
|
||||
"not_empty": True},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -683,3 +683,8 @@ class TestWebapps(TestCase):
|
|||
self.data["permissions"]["settings"]["access"] = "createonly"
|
||||
self.analyze()
|
||||
self.assert_failed(with_errors=True)
|
||||
|
||||
def test_csp(self):
|
||||
self.data['csp'] = 'this is the csp policy. it can be a string.'
|
||||
self.analyze()
|
||||
self.assert_silent()
|
||||
|
|
Загрузка…
Ссылка в новой задаче