Bug 1353074 - Run Components permission test in all sandboxes; r=maja_zf

The Components.classes constructor should throw an error in both the
mutable and the "default" sandbox.

MozReview-Commit-ID: C40nZNaVWwz

--HG--
extra : rebase_source : f02506f16ff409761ba09ae0f32ff2902cdf07a3
This commit is contained in:
Andreas Tolfsen 2017-04-03 19:18:25 +01:00
Родитель efe0198497
Коммит 31840306ac
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -164,10 +164,10 @@ class TestExecuteContent(MarionetteTestCase):
self.assertIn("return b", cm.exception.stacktrace)
def test_permission(self):
with self.assertRaises(errors.JavascriptException):
self.marionette.execute_script("""
var c = Components.classes["@mozilla.org/preferences-service;1"];
""")
for sandbox in ["default", None]:
with self.assertRaises(errors.JavascriptException):
self.marionette.execute_script(
"Components.classes['@mozilla.org/preferences-service;1']")
def test_return_web_element(self):
self.marionette.navigate(elements)