summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/regress/regress-555246-1.js
blob: c9bd4d0f35b7f5aba78444514f0ea0fa7066cf56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 * Contributor: Jason Orendorff
 */

if (typeof evalcx == 'function') {
    var cx = evalcx("");
    evalcx("function f() { return this; }", cx);
    f = cx.f;
    assertEq(f(), cx);

    evalcx("function g() { 'use strict'; return this; }", cx);
    g = cx.g;
    assertEq(g(), undefined);
}

reportCompare(0, 0, "ok");