diff options
Diffstat (limited to 'js/src/tests/test262/language/function-code/S10.4.3_A1-strict.js')
-rw-r--r-- | js/src/tests/test262/language/function-code/S10.4.3_A1-strict.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/function-code/S10.4.3_A1-strict.js b/js/src/tests/test262/language/function-code/S10.4.3_A1-strict.js new file mode 100644 index 0000000000..d1bda57215 --- /dev/null +++ b/js/src/tests/test262/language/function-code/S10.4.3_A1-strict.js @@ -0,0 +1,18 @@ +'use strict'; +// Copyright 2011 Google, Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es5id: 10.4.3_A1 +description: > + When calling a strict anonymous function as a function, "this" + should be bound to undefined. +flags: [onlyStrict] +---*/ + +var that = (function() { return this; })(); +if (that !== undefined) { + $ERROR('#1: "this" leaked as: ' + that); +} + +reportCompare(0, 0); |