test_xray_regexp.js (316B)
1 function run_test() { 2 var sandbox = Cu.Sandbox('http://www.example.com'); 3 var regexp = Cu.evalInSandbox("/test/i", sandbox); 4 equal(RegExp.prototype.toString.call(regexp), "/test/i"); 5 var prototype = Cu.evalInSandbox("RegExp.prototype", sandbox); 6 equal(typeof prototype.lastIndex, "undefined"); 7 }