summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-createSource.js
blob: 53f1c28c1be3cfe8a223b52034584663621be07e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// createSource creates new sources.

let g = newGlobal({ newCompartment: true });
let dbg = new Debugger(g);
let gdbg = dbg.addDebuggee(g);

let source = gdbg.createSource({
  text: "x = 3",
  url: "foo.js",
  startLine: 3,
  startColumn: 43,
  sourceMapURL: "sourceMapURL",
  isScriptElement: true,
});
assertEq(source.text, "x = 3");
assertEq(source.url, "foo.js");
assertEq(source.startLine, 3);
assertEq(source.startColumn, 43);
assertEq(source.sourceMapURL, "sourceMapURL");
assertEq(source.introductionType, "inlineScript");