Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test262
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pmaksimo
test262
Commits
1e6cbbf7
Unverified
Commit
1e6cbbf7
authored
8 years ago
by
Mike Pennisi
Committed by
Leonardo Balter
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add test ensuring withEnvironment flag is honored
parent
6a3837fc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/language/global-code/unscopables-ignored.js
+45
-0
45 additions, 0 deletions
test/language/global-code/unscopables-ignored.js
with
45 additions
and
0 deletions
test/language/global-code/unscopables-ignored.js
0 → 100644
+
45
−
0
View file @
1e6cbbf7
// Copyright (c) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-global-environment-records-hasbinding-n
es6id: 8.1.1.4.1
description: >
Symbol.unscopables is not referenced for the object environment of the global
environment record
info: |
1. Let envRec be the global Environment Record for which the method was invoked.
2. Let DclRec be envRec.[[DeclarativeRecord]].
3. If DclRec.HasBinding(N) is true, return true.
4. Let ObjRec be envRec.[[ObjectRecord]].
5. Return ? ObjRec.HasBinding(N).
8.1.1.2.1 HasBinding
1. Let envRec be the object Environment Record for which the method was
invoked.
2. Let bindings be the binding object for envRec.
3. Let foundBinding be ? HasProperty(bindings, N).
4. If foundBinding is false, return false.
5. If the withEnvironment flag of envRec is false, return true.
6. Let unscopables be ? Get(bindings, @@unscopables).
7. If Type(unscopables) is Object, then
a. Let blocked be ToBoolean(? Get(unscopables, N)).
b. If blocked is true, return false.
8. Return true.
features: [Symbol.unscopables]
---*/
var
callCount
=
0
;
Object
.
defineProperty
(
this
,
Symbol
.
unscopables
,
{
get
:
function
()
{
callCount
+=
1
;
}
});
this
.
test262
=
true
;
test262
;
assert
.
sameValue
(
callCount
,
0
,
'
Did not reference @@unscopables property of global object
'
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment