| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --expose-debug-as debug | |
| 6 | 5 |
| 7 function f() { | 6 function f() { |
| 8 print(1); | 7 print(1); |
| 9 print(2); | 8 print(2); |
| 10 print(3); | 9 print(3); |
| 11 } | 10 } |
| 12 | 11 |
| 13 var Debug = debug.Debug; | 12 var Debug = debug.Debug; |
| 14 var exception = null; | 13 var exception = null; |
| 15 var breaks = []; | 14 var breaks = []; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 29 Debug.setBreakPoint(f, 0, 0); | 28 Debug.setBreakPoint(f, 0, 0); |
| 30 | 29 |
| 31 f(); | 30 f(); |
| 32 | 31 |
| 33 Debug.setListener(null); | 32 Debug.setListener(null); |
| 34 Debug.debuggerFlags().breakPointsActive.setValue(true); | 33 Debug.debuggerFlags().breakPointsActive.setValue(true); |
| 35 | 34 |
| 36 assertNull(exception); | 35 assertNull(exception); |
| 37 assertEquals(breaks, ["print(1);", "print(2);", "print(3);", "}", | 36 assertEquals(breaks, ["print(1);", "print(2);", "print(3);", "}", |
| 38 "Debug.setListener(null);"]); | 37 "Debug.setListener(null);"]); |
| OLD | NEW |