diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Object-createSource.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Object-createSource.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Object-createSource.js b/js/src/jit-test/tests/debug/Object-createSource.js new file mode 100644 index 0000000000..e71bd702e1 --- /dev/null +++ b/js/src/jit-test/tests/debug/Object-createSource.js @@ -0,0 +1,18 @@ +// 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, + sourceMapURL: "sourceMapURL", + isScriptElement: true, +}); +assertEq(source.text, "x = 3"); +assertEq(source.url, "foo.js"); +assertEq(source.startLine, 3); +assertEq(source.sourceMapURL, "sourceMapURL"); +assertEq(source.introductionType, "inlineScript"); |