summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_xray_regexp.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 12:47:01 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 12:47:01 +0100
commita413cf72888dcb5197ba44aba547b8d496231cff (patch)
tree35a642b0239e0a0c01e8326fcea611416ce7dd80 /js/xpconnect/tests/unit/test_xray_regexp.js
parent3114d48cee98c43c5d980eccfc104854860ef2be (diff)
downloadUXP-a413cf72888dcb5197ba44aba547b8d496231cff.tar
UXP-a413cf72888dcb5197ba44aba547b8d496231cff.tar.gz
UXP-a413cf72888dcb5197ba44aba547b8d496231cff.tar.lz
UXP-a413cf72888dcb5197ba44aba547b8d496231cff.tar.xz
UXP-a413cf72888dcb5197ba44aba547b8d496231cff.zip
Update RegExp Xray code
Issue #77
Diffstat (limited to 'js/xpconnect/tests/unit/test_xray_regexp.js')
-rw-r--r--js/xpconnect/tests/unit/test_xray_regexp.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/xpconnect/tests/unit/test_xray_regexp.js b/js/xpconnect/tests/unit/test_xray_regexp.js
new file mode 100644
index 000000000..4baffd63e
--- /dev/null
+++ b/js/xpconnect/tests/unit/test_xray_regexp.js
@@ -0,0 +1,9 @@
+const Cu = Components.utils;
+
+function run_test() {
+ var sandbox = Cu.Sandbox('http://www.example.com');
+ var regexp = Cu.evalInSandbox("/test/i", sandbox);
+ equal(RegExp.prototype.toString.call(regexp), "/test/i");
+ var prototype = Cu.evalInSandbox("RegExp.prototype", sandbox);
+ equal(typeof prototype.lastIndex, "undefined");
+}