Index: test/mjsunit/harmony/debug-blockscopes.js |
diff --git a/test/mjsunit/harmony/debug-blockscopes.js b/test/mjsunit/harmony/debug-blockscopes.js |
index 2db49427ccd975d669016e8c935f1d8b5e7e41d9..f3a0ab9cf093d8418a3677e28efbf9c71dd14ff9 100644 |
--- a/test/mjsunit/harmony/debug-blockscopes.js |
+++ b/test/mjsunit/harmony/debug-blockscopes.js |
@@ -73,7 +73,7 @@ function BeginTest(name) { |
// Check result of a test. |
function EndTest() { |
assertTrue(listener_called, "listerner not called for " + test_name); |
- assertNull(exception, test_name); |
+ assertNull(exception, test_name, exception); |
end_test_count++; |
} |
@@ -108,6 +108,7 @@ function CheckScopeChain(scopes, exec_state) { |
assertEquals(i, response.body.scopes[i].index); |
assertEquals(scopes[i], response.body.scopes[i].type); |
if (scopes[i] == debug.ScopeType.Local || |
+ scopes[i] == debug.ScopeType.Script || |
scopes[i] == debug.ScopeType.Closure) { |
assertTrue(response.body.scopes[i].object.ref < 0); |
} else { |
@@ -197,6 +198,7 @@ function local_block_1() { |
listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({}, 0, exec_state); |
}; |
@@ -215,6 +217,7 @@ function local_2(a) { |
listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({a:1}, 0, exec_state); |
}; |
@@ -232,6 +235,7 @@ function local_3(a) { |
listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({a:1,x:3}, 0, exec_state); |
}; |
@@ -250,6 +254,7 @@ function local_4(a, b) { |
listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({a:1,b:2,x:3,y:4}, 0, exec_state); |
}; |
@@ -270,6 +275,7 @@ function local_5(a) { |
listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Block, |
debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({x:5}, 0, exec_state); |
CheckScopeContent({a:1}, 1, exec_state); |
@@ -292,6 +298,7 @@ function local_6(a) { |
listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Block, |
debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({x:6,y:7}, 0, exec_state); |
CheckScopeContent({a:1}, 1, exec_state); |
@@ -315,6 +322,7 @@ function local_7(a) { |
listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Block, |
debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({x:8}, 0, exec_state); |
CheckScopeContent({a:1}, 1, exec_state); |
@@ -344,6 +352,7 @@ listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Local, |
debug.ScopeType.Block, |
debug.ScopeType.Closure, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({}, 0, exec_state); |
CheckScopeContent({a:1,x:2,y:3}, 2, exec_state); |
@@ -364,6 +373,7 @@ function for_loop_1() { |
listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Block, |
debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({x:'y'}, 0, exec_state); |
// The function scope contains a temporary iteration variable, but it is |
@@ -389,6 +399,7 @@ listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Block, |
debug.ScopeType.Block, |
debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({x:3}, 0, exec_state); |
CheckScopeContent({x:'y'}, 1, exec_state); |
@@ -413,6 +424,7 @@ listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Block, |
debug.ScopeType.Block, |
debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({x:3}, 0, exec_state); |
CheckScopeContent({x:3}, 1, exec_state); |
@@ -437,6 +449,7 @@ listener_delegate = function(exec_state) { |
debug.ScopeType.Block, |
debug.ScopeType.Block, |
debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({x:5}, 0, exec_state); |
CheckScopeContent({x:3}, 1, exec_state); |
@@ -460,6 +473,7 @@ listener_delegate = function(exec_state) { |
CheckScopeChain([debug.ScopeType.Block, |
debug.ScopeType.Block, |
debug.ScopeType.Local, |
+ debug.ScopeType.Script, |
debug.ScopeType.Global], exec_state); |
CheckScopeContent({x:3,y:5}, 0, exec_state); |
CheckScopeContent({x:3,y:5}, 1, exec_state); |