summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_5/extensions/regress-bug607284.js
blob: 7d2c4921d2977f653c1a05e8130fa3cc0ad9cc5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

if ("evalcx" in this) {
  var sandbox = evalcx("");
  var obj = { get foo() { throw("FAIL"); } };
  var getter = obj.__lookupGetter__("foo");
  var desc = sandbox.Object.getOwnPropertyDescriptor(obj, "foo");
  reportCompare(desc.get, getter, "getter is correct");
  reportCompare(desc.set, undefined, "setter is correct");
}
else {
  reportCompare(true, true);
}