summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_xray_regexp.js
blob: 4baffd63e90ff01f26bb343b8595b0f533bf4c33 (plain)
1
2
3
4
5
6
7
8
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");
}