| Index: test/mjsunit/harmony/debug-blockscopes.js
|
| diff --git a/test/mjsunit/harmony/debug-blockscopes.js b/test/mjsunit/harmony/debug-blockscopes.js
|
| index 30f681f129da92cdc6a97fea1cd0bb26c1e91a23..e0df71b2dfe9a6df1898b3d0446a889934312e0b 100644
|
| --- a/test/mjsunit/harmony/debug-blockscopes.js
|
| +++ b/test/mjsunit/harmony/debug-blockscopes.js
|
| @@ -157,7 +157,6 @@ function CheckScopeContent(content, number, exec_state) {
|
| scope_size--;
|
| }
|
|
|
| - // TODO(keuchel): print('count' + count + ' scopesize' + scope_size);
|
| if (count != scope_size) {
|
| print('Names found in scope:');
|
| var names = scope.scopeObject().propertyNames();
|
| @@ -236,7 +235,7 @@ EndTest();
|
| BeginTest("Local 3");
|
|
|
| function local_3(a) {
|
| - var x = 3;
|
| + let x = 3;
|
| debugger;
|
| }
|
|
|
| @@ -253,8 +252,8 @@ EndTest();
|
| BeginTest("Local 4");
|
|
|
| function local_4(a, b) {
|
| - var x = 3;
|
| - var y = 4;
|
| + let x = 3;
|
| + let y = 4;
|
| debugger;
|
| }
|
|
|
| @@ -361,29 +360,30 @@ with_block_4();
|
| EndTest();
|
|
|
|
|
| -// TODO(keuchel):
|
| // Simple closure formed by returning an inner function referering to an outer
|
| // block local variable and an outer function's parameter.
|
| -// BeginTest("Closure 1");
|
| -//
|
| -// function closure_1(a) {
|
| -// {
|
| -// let x = 3;
|
| -// function f() {
|
| -// debugger;
|
| -// return a + x;
|
| -// };
|
| -// }
|
| -// return f;
|
| -// }
|
| -//
|
| -// listener_delegate = function(exec_state) {
|
| -// CheckScopeChain([debug.ScopeType.Local,
|
| -// debug.ScopeType.Closure,
|
| -// debug.ScopeType.Global], exec_state);
|
| -// // CheckScopeContent({}, 0, exec_state);
|
| -// // CheckScopeContent({}, 1, exec_state);
|
| -// // CheckScopeContent({a:1}, 2, exec_state);
|
| -// };
|
| -// closure_1(1)();
|
| -// EndTest();
|
| +BeginTest("Closure 1");
|
| +
|
| +function closure_1(a) {
|
| + var x = 2;
|
| + let y = 3;
|
| + if (true) {
|
| + let z = 4;
|
| + function f() {
|
| + debugger;
|
| + return a + x + y + z;
|
| + };
|
| + return f;
|
| + }
|
| +}
|
| +
|
| +listener_delegate = function(exec_state) {
|
| + CheckScopeChain([debug.ScopeType.Local,
|
| + debug.ScopeType.Block,
|
| + debug.ScopeType.Closure,
|
| + debug.ScopeType.Global], exec_state);
|
| + CheckScopeContent({}, 0, exec_state);
|
| + CheckScopeContent({a:1,x:2,y:3}, 2, exec_state);
|
| +};
|
| +closure_1(1)();
|
| +EndTest();
|
|
|