OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 301 |
302 listener_delegate = function(exec_state) { | 302 listener_delegate = function(exec_state) { |
303 CheckScopeChain([debug.ScopeType.Local, | 303 CheckScopeChain([debug.ScopeType.Local, |
304 debug.ScopeType.Global], exec_state); | 304 debug.ScopeType.Global], exec_state); |
305 CheckScopeContent({a:1,b:2,x:3,y:4,i:5,j:6}, 0, exec_state); | 305 CheckScopeContent({a:1,b:2,x:3,y:4,i:5,j:6}, 0, exec_state); |
306 }; | 306 }; |
307 local_7(1, 2); | 307 local_7(1, 2); |
308 EndTest(); | 308 EndTest(); |
309 | 309 |
310 | 310 |
| 311 // Simple empty local scope but for a strict-mode function where the |
| 312 // receiver is undefined. |
| 313 BeginTest("Local 8"); |
| 314 |
| 315 function local_8() { |
| 316 "use strict"; |
| 317 debugger; |
| 318 } |
| 319 |
| 320 listener_delegate = function(exec_state) { |
| 321 CheckScopeChain([debug.ScopeType.Local, |
| 322 debug.ScopeType.Global], exec_state); |
| 323 CheckScopeContent({}, 0, exec_state); |
| 324 }; |
| 325 local_8(); |
| 326 EndTest(); |
| 327 |
| 328 |
311 // Single empty with block. | 329 // Single empty with block. |
312 BeginTest("With 1"); | 330 BeginTest("With 1"); |
313 | 331 |
314 function with_1() { | 332 function with_1() { |
315 with({}) { | 333 with({}) { |
316 debugger; | 334 debugger; |
317 } | 335 } |
318 } | 336 } |
319 | 337 |
320 listener_delegate = function(exec_state) { | 338 listener_delegate = function(exec_state) { |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 CheckScopeContent({y:98}, 2, exec_state); | 890 CheckScopeContent({y:98}, 2, exec_state); |
873 }; | 891 }; |
874 catch_block_4(); | 892 catch_block_4(); |
875 EndTest(); | 893 EndTest(); |
876 | 894 |
877 | 895 |
878 assertEquals(begin_test_count, break_count, | 896 assertEquals(begin_test_count, break_count, |
879 'one or more tests did not enter the debugger'); | 897 'one or more tests did not enter the debugger'); |
880 assertEquals(begin_test_count, end_test_count, | 898 assertEquals(begin_test_count, end_test_count, |
881 'one or more tests did not have its result checked'); | 899 'one or more tests did not have its result checked'); |
OLD | NEW |