1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
4 * Any copyright is dedicated to the Public Domain.
5 * http://creativecommons.org/licenses/publicdomain/
8 /* Test JSOP_UNBRANDTHIS's behavior on object and non-object |this| values. */
12 this.insert = function(){ bar(); };
18 // Try 'undefined' as a |this| value.
21 strict.call(undefined);
25 assertEq(exception instanceof TypeError, true);
27 // Try 'null' as a |this| value.
34 assertEq(exception instanceof TypeError, true);
36 // An object as a |this| value should be fine.
43 assertEq(exception, null);
45 reportCompare(true, true);