summaryrefslogtreecommitdiff
path: root/deps/v8/test/inspector/debugger/get-possible-breakpoints-class-fields.js
blob: 068fce2557ce9f55b69e563de871f9252a8b9805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --harmony-public-fields --harmony-static-fields

let { session, contextGroup, Protocol } = InspectorTest.start(
  "Checks Debugger.getPossibleBreakpoints for class fields"
);

(async function() {
  session.setupScriptMap();
  await Protocol.Debugger.enable();

  const source = utils.read(
    "test/inspector/debugger/resources/break-locations-class-fields.js"
  );

  contextGroup.addScript(source);

  const {
    params: { scriptId }
  } = await Protocol.Debugger.onceScriptParsed();

  const {
    result: { locations }
  } = await Protocol.Debugger.getPossibleBreakpoints({
    start: {
      lineNumber: 0,
      columnNumber: 0,
      scriptId
    }
  });

  session.logBreakLocations(locations);
  InspectorTest.completeTest();
})();