OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 | |
6 // Do not edit this file with an editor that replaces \r with \r\n. | |
7 // Variable definitions for i0 through i3 are each terminated with \r. | |
8 function f() { | |
9 var i0 = 0; | |
10 var i1 = 1; | |
11 var i2 = 2; | |
12 var i3 = 3; | |
13 var j0 = 0; | |
14 var j1 = 1; | |
15 var j2 = 2; | |
16 var j3 = 3; | |
17 } | |
18 | |
19 Debug = debug.Debug; | |
20 var exception = null; | |
21 var break_point_hit = false; | |
22 | |
23 function listener(event, exec_state, event_data, data) { | |
24 if (event != Debug.DebugEvent.Break) return; | |
25 try { | |
26 break_point_hit = true; | |
27 assertEquals(" var i2 = 2;", exec_state.frame(0).sourceLineText()); | |
28 } catch (e) { | |
29 print(e + e.stack); | |
30 exception = e; | |
31 } | |
32 } | |
33 | |
34 Debug.setListener(listener); | |
35 | |
36 Debug.setBreakPoint(f, 3, 0); | |
37 | |
38 f(); | |
39 | |
40 Debug.setListener(null); | |
41 assertTrue(break_point_hit); | |
42 assertNull(exception); | |
OLD | NEW |