Dactyloidae/js/xpconnect/tests/unit/test_xray_regexp.js
janekptacijarabaci d3ffa46e36 Update RegExp Xray code
Issue #77
2019-02-15 23:38:37 +08:00

9 lines
346 B
JavaScript

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");
}