Lines Matching refs:scopes
56 function CheckFastAllScopes(scopes, exec_state) {
59 assertTrue(scopes.length >= length);
60 for (var i = 0; i < scopes.length && i < length; i++) {
63 assertEquals(scopes[scopes.length - i - 1], scope.scopeType());
67 // Check that the scope chain contains the expected types of scopes.
68 function CheckScopeChain(scopes, exec_state) {
70 assertEquals(scopes.length, exec_state.frame().scopeCount());
71 assertEquals(scopes.length, all_scopes.length, "FrameMirror.allScopes length");
72 for (var i = 0; i < scopes.length; i++) {
75 assertEquals(scopes[i], scope.scopeType());
79 if (scopes[i] == debug.ScopeType.Global) {
85 CheckFastAllScopes(scopes, exec_state);
90 // Send a scopes request and check the result.
92 var request_json = '{"seq":0,"type":"request","command":"scopes"}';
95 assertEquals(scopes.length, response.body.scopes.length);
96 for (var i = 0; i < scopes.length; i++) {
97 assertEquals(i, response.body.scopes[i].index);
98 assertEquals(scopes[i], response.body.scopes[i].type);
99 if (scopes[i] == debug.ScopeType.Local ||
100 scopes[i] == debug.ScopeType.Closure) {
101 assertTrue(response.body.scopes[i].object.ref < 0);
103 assertTrue(response.body.scopes[i].object.ref >= 0);
107 found = response.refs[j].handle == response.body.scopes[i].object.ref;
109 assertTrue(found, "Scope object " + response.body.scopes[i].object.ref + " not found");