summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_7/AsyncFunctions/arguments_callee.js
blob: 2a577e0b9d401eb564f0dfa89c5fff83f353d067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// |reftest| skip-if(!xulRuntime.shell) -- needs drainJobQueue

var BUGNUMBER = 1185106;
var summary = "arguments.callee in sloppy mode should return wrapped function";

print(BUGNUMBER + ": " + summary);

async function decl1() {
  return arguments.callee;
}
assertEventuallyEq(decl1(), decl1);

var expr1 = async function foo() {
  return arguments.callee;
};
assertEventuallyEq(expr1(), expr1);

var expr2 = async function() {
  return arguments.callee;
};
assertEventuallyEq(expr2(), expr2);

var obj = {
  async method1() {
    return arguments.callee;
  }
};
assertEventuallyEq(obj.method1(), obj.method1);

if (typeof reportCompare === "function")
    reportCompare(true, true);