24beac30ee
Introduce Protocol.Domain.method(args) and Protocol.Domain.onEventName() instead. Renamed InspectorTest.evaluateInPage -> InspectorTest.addScript. Improved InspectorTest.logMessage. BUG=chromium:635948 R=dgozman@chromium.org,alph@chromium.org Review-Url: https://codereview.chromium.org/2390733002 Cr-Commit-Position: refs/heads/master@{#39942}
141 lines
3.3 KiB
Plaintext
141 lines
3.3 KiB
Plaintext
Tests that Runtime.callFunctionOn works with awaitPromise flag.
|
|
|
|
Running test: testArguments
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
type : string
|
|
value : undefined|NaN|[object Object]|[object Object]
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testSyntaxErrorInFunction
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
exceptionDetails : {
|
|
columnNumber : 2
|
|
exception : {
|
|
className : SyntaxError
|
|
description : SyntaxError: Unexpected token }
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 1
|
|
scriptId : <scriptId>
|
|
text : Uncaught
|
|
}
|
|
result : {
|
|
className : SyntaxError
|
|
description : SyntaxError: Unexpected token }
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testExceptionInFunctionExpression
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
exceptionDetails : {
|
|
columnNumber : 15
|
|
exception : {
|
|
className : Error
|
|
description : Error at <anonymous>:1:22 at <anonymous>:1:36
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
text : Uncaught
|
|
}
|
|
result : {
|
|
className : Error
|
|
description : Error at <anonymous>:1:22 at <anonymous>:1:36
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testFunctionReturnNotPromise
|
|
{
|
|
code : -32000
|
|
message : Result of the function call is not a promise
|
|
}
|
|
|
|
Running test: testFunctionReturnResolvedPromiseReturnByValue
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
type : object
|
|
value : {
|
|
a : 3
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testFunctionReturnResolvedPromiseWithPreview
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Object
|
|
overflow : false
|
|
properties : [
|
|
[0] : {
|
|
name : a
|
|
type : number
|
|
value : 3
|
|
}
|
|
]
|
|
type : object
|
|
}
|
|
type : object
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testFunctionReturnRejectedPromise
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
exceptionDetails : {
|
|
columnNumber : 0
|
|
exception : {
|
|
type : object
|
|
value : {
|
|
a : 3
|
|
}
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 0
|
|
stackTrace : {
|
|
callFrames : [
|
|
]
|
|
}
|
|
text : Uncaught (in promise)
|
|
}
|
|
result : {
|
|
type : object
|
|
value : {
|
|
a : 3
|
|
}
|
|
}
|
|
}
|
|
} |