OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 'use strict'; | |
7 | |
8 var Debug = debug.Debug | |
9 | |
10 var done = false; | |
11 var stepCount = 0; | |
12 | |
13 function listener(event, execState, eventData, data) { | |
14 if (event == Debug.DebugEvent.Break) { | |
15 if (!done) { | |
16 execState.prepareStep(Debug.StepAction.StepIn); | |
17 var s = execState.frame().sourceLineText(); | |
18 assertTrue(s.indexOf('// ' + stepCount + '.') !== -1); | |
19 stepCount++; | |
20 } | |
21 } | |
22 }; | |
23 | |
24 Debug.setListener(listener); | |
25 | |
26 function GetBase() { | |
27 var x = 1; // 1. | |
28 var y = 2; // 2. | |
29 done = true; // 3. | |
30 return null; | |
31 } | |
32 | |
33 function f() { | |
34 class Derived extends GetBase() {} // 0. | |
35 } | |
36 | |
37 var bp = Debug.setBreakPoint(f, 0); | |
38 f(); | |
39 assertEquals(4, stepCount); | |
40 | |
41 Debug.setListener(null); | |
OLD | NEW |