blob: 742c4d664be4414fd327d87c7ccd42ed77b4dadc [file] [log] [blame]
Tests that we can parse the stack trace format used by JavaScriptCore and the contents of Error / console.trace stack traces.
== Running test suite: ConsoleTraceAndJavaScriptStackTrace
-- Running test case: ConsoleTraceAndJavaScriptStackTrace.BasicError
console.trace():
[
{
"lineNumber": 10,
"columnNumber": 22,
"functionName": "typeError",
"nativeCode": false,
"programCode": false
},
{
"lineNumber": 16,
"columnNumber": 21,
"functionName": "triggerTypeError",
"nativeCode": false,
"programCode": false
},
{
"lineNumber": 0,
"columnNumber": 17,
"functionName": "Global Code",
"nativeCode": false,
"programCode": true
}
]
Error object:
[
{
"functionName": "typeError",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 9,
"columnNumber": 30
},
{
"functionName": "triggerTypeError",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 17,
"columnNumber": 21
},
{
"functionName": "global code",
"url": "",
"lineNumber": 0,
"columnNumber": 0
}
]
-- Running test case: ConsoleTraceAndJavaScriptStackTrace.ErrorInNativeCall
console.trace():
[
{
"lineNumber": 10,
"columnNumber": 22,
"functionName": "typeError",
"nativeCode": false,
"programCode": false
},
{
"lineNumber": null,
"columnNumber": null,
"functionName": "map",
"nativeCode": true,
"programCode": false
},
{
"lineNumber": 20,
"columnNumber": 20,
"functionName": "triggerTypeErrorWithNativeCallInBetween",
"nativeCode": false,
"programCode": false
},
{
"lineNumber": 0,
"columnNumber": 40,
"functionName": "Global Code",
"nativeCode": false,
"programCode": true
}
]
Error object:
[
{
"functionName": "typeError",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 9,
"columnNumber": 30
},
{
"functionName": "map",
"url": "[native code]",
"lineNumber": 0,
"columnNumber": 0
},
{
"functionName": "triggerTypeErrorWithNativeCallInBetween",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 21,
"columnNumber": 20
},
{
"functionName": "global code",
"url": "",
"lineNumber": 0,
"columnNumber": 0
}
]
-- Running test case: ConsoleTraceAndJavaScriptStackTrace.ErrorInAnonymousFunction
Error object:
[
{
"functionName": "",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 29,
"columnNumber": 33
},
{
"functionName": "global code",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 33,
"columnNumber": 3
}
]
-- Running test case: ConsoleTraceAndJavaScriptStackTrace.ErrorInGenerator
console.trace():
[
{
"lineNumber": 10,
"columnNumber": 22,
"functionName": "typeError",
"nativeCode": false,
"programCode": false
},
{
"lineNumber": 43,
"columnNumber": 20,
"functionName": "generator2",
"nativeCode": false,
"programCode": false
},
{
"lineNumber": null,
"columnNumber": null,
"functionName": "generatorResume",
"nativeCode": true,
"programCode": false
},
{
"lineNumber": 39,
"columnNumber": 12,
"functionName": "generator1",
"nativeCode": false,
"programCode": false
},
{
"lineNumber": null,
"columnNumber": null,
"functionName": "generatorResume",
"nativeCode": true,
"programCode": false
},
{
"lineNumber": 47,
"columnNumber": 29,
"functionName": "triggerGeneratorError",
"nativeCode": false,
"programCode": false
},
{
"lineNumber": 0,
"columnNumber": 22,
"functionName": "Global Code",
"nativeCode": false,
"programCode": true
}
]
Error object:
[
{
"functionName": "typeError",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 9,
"columnNumber": 30
},
{
"functionName": "generator2",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 44,
"columnNumber": 20
},
{
"functionName": "generatorResume",
"url": "[native code]",
"lineNumber": 0,
"columnNumber": 0
},
{
"functionName": "generator1",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 40,
"columnNumber": 12
},
{
"functionName": "generatorResume",
"url": "[native code]",
"lineNumber": 0,
"columnNumber": 0
},
{
"functionName": "triggerGeneratorError",
"url": "/inspector/debugger/js-stacktrace.html",
"lineNumber": 48,
"columnNumber": 29
},
{
"functionName": "global code",
"url": "",
"lineNumber": 0,
"columnNumber": 0
}
]