Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (18 sloc) 0.603 kb
from js_helper import _do_test_raw
def test_jsm_global_overwrites():
"""
JavaScript modules do not cause global scope conflicts, so we should not
make errors if globals are overwritten.
"""
assert _do_test_raw("""
String.prototype.foo = "bar";
""").failed()
assert not _do_test_raw("""
String.prototype.foo = "bar";
""", path="test.jsm").failed()
def test_jsm_EXPORTED_SYMBOLS():
"""Test that EXPORTED_SYMBOLS is a trigger for JSM."""
assert not _do_test_raw("""
var EXPORTED_SYMBOLS = foo;
String.prototype.foo = "bar";
""").failed()
Jump to Line
Something went wrong with that request. Please try again.