michael@0: // |reftest| fails-if(!xulRuntime.shell) michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: michael@0: var sandbox = evalcx(''); michael@0: var foreign = evalcx('({ get f() this, set x(v) { result = this } })', sandbox); michael@0: var local = Object.create(foreign); michael@0: michael@0: reportCompare(local, local.f, "this should be set correctly in getters"); michael@0: local.x = 42; michael@0: reportCompare(local, sandbox.result, "this should be set correctly in setters");