blob: d13e0a7eeb2d166f272349712267b644baa26034 [file] [log] [blame]
Andrew Topef837fa2017-10-04 22:44:25 -07001// 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"use strict";
7
8var Debug = debug.Debug;
9var exception = null;
10var super_called = false;
11var step_count = 0;
12
13function listener(event, execState, eventData, data) {
14 if (event != Debug.DebugEvent.Break) return;
15 try {
16 execState.prepareStep(Debug.StepAction.StepIn);
17 var s = execState.frame().sourceLineText();
18 step_count++;
19 assertTrue(s.indexOf('// ' + step_count + '.') >= 0);
20 } catch (e) {
21 exception = e;
22 }
23}
24
25class Base {
26 constructor() {
27 var x = 1; // 2.
28 } // 3.
29}
30
31class Derived extends Base {} // 1. // 4.
32
33Debug.setListener(listener);
34var bp = Debug.setBreakPoint(Derived, 0);
35
36new Derived();
37
38Debug.setListener(null); // 5.
39
40assertNull(exception);
41assertEquals(5, step_count);