michael@0: // |reftest| skip-if(!xulRuntime.shell) michael@0: // bug 905774 michael@0: michael@0: // Proxy options michael@0: var opts = new Proxy({loc: false}, {}); michael@0: assertEq(Reflect.parse("0;", opts).loc === null, true); michael@0: opts.loc = true; michael@0: assertEq(Reflect.parse("0;", opts).loc !== null, true); michael@0: delete opts.loc; michael@0: assertEq(Reflect.parse("0;", opts).loc !== null, true); // default is true michael@0: michael@0: // Proxy builder michael@0: var builder = { michael@0: program: function (body) { return body.join(); }, michael@0: expressionStatement: function (expr) { return expr + ";" }, michael@0: literal: function (val) { return "" + val; } michael@0: }; michael@0: opts = {builder: new Proxy(builder, {})}; michael@0: assertEq(Reflect.parse("0xff;", opts), "255;"); michael@0: michael@0: reportCompare(0, 0, 'ok');