summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_xray_regexp.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/tests/unit/test_xray_regexp.js')
-rw-r--r--js/xpconnect/tests/unit/test_xray_regexp.js7
1 files changed, 7 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 0000000000..72eb9563d0
--- /dev/null
+++ b/js/xpconnect/tests/unit/test_xray_regexp.js
@@ -0,0 +1,7 @@
+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");
+}