Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: test/mjsunit/debug-scopes.js

Issue 1901413002: [debugger] Hide scopes that originate from desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 BeginTest("Scope positions in for statement"); 1172 BeginTest("Scope positions in for statement");
1173 var code3 = "function for_statement() { \n" + 1173 var code3 = "function for_statement() { \n" +
1174 " for (let i = 0; i < 1; i++) { \n" + 1174 " for (let i = 0; i < 1; i++) { \n" +
1175 " debugger; \n" + 1175 " debugger; \n" +
1176 " } \n" + 1176 " } \n" +
1177 "} \n" + 1177 "} \n" +
1178 "for_statement(); \n"; 1178 "for_statement(); \n";
1179 1179
1180 listener_delegate = function(exec_state) { 1180 listener_delegate = function(exec_state) {
1181 CheckScopeChain([debug.ScopeType.Block, 1181 CheckScopeChain([debug.ScopeType.Block,
1182 debug.ScopeType.Block,
1183 debug.ScopeType.Local, 1182 debug.ScopeType.Local,
1184 debug.ScopeType.Script, 1183 debug.ScopeType.Script,
1185 debug.ScopeType.Global], exec_state); 1184 debug.ScopeType.Global], exec_state);
1186 CheckScopeChainPositions([{start: 52, end: 111}, {start: 42, end: 111}, {start : 22, end: 145}, {}, {}], exec_state); 1185 CheckScopeChainPositions([{start: 52, end: 111}, {start: 22, end: 145}, {}, {} ], exec_state);
1187 } 1186 }
1188 eval(code3); 1187 eval(code3);
1189 EndTest(); 1188 EndTest();
1190 1189
1191 assertEquals(begin_test_count, break_count, 1190 assertEquals(begin_test_count, break_count,
1192 'one or more tests did not enter the debugger'); 1191 'one or more tests did not enter the debugger');
1193 assertEquals(begin_test_count, end_test_count, 1192 assertEquals(begin_test_count, end_test_count,
1194 'one or more tests did not have its result checked'); 1193 'one or more tests did not have its result checked');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698