test262/test/language/eval-code/indirect/this-value-func.js
Mike Pennisi 2872537136 Add equivalent tests for eval code
For each test that asserts the behavior of either "direct" or "indirect"
eval (but not both), introduce an equivalent test for the opposite case.
2016-04-25 16:36:41 -04:00

17 lines
397 B
JavaScript

// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Direct eval code has the same `this` binding as the calling context
(non-strict function scope)
esid: sec-performeval
---*/
var thisValue;
(function() {
thisValue = (0,eval)('this;');
}());
assert.sameValue(thisValue, this);