2016-12-23 16:30:57 +01:00
|
|
|
Tests that Runtime.callFunctionOn works with awaitPromise flag.
|
|
|
|
|
2017-10-18 15:03:02 -07:00
|
|
|
Running test: prepareTestSuite
|
|
|
|
|
2016-12-23 16:30:57 +01:00
|
|
|
Running test: testArguments
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
type : string
|
|
|
|
value : undefined|NaN|[object Object]|[object Object]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-31 11:11:57 +02:00
|
|
|
Running test: testUnserializableArguments
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
type : string
|
|
|
|
value : true|true|true|true|bigint
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-18 15:03:02 -07:00
|
|
|
Running test: testComplexArguments
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
type : string
|
|
|
|
value : bar
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-23 16:30:57 +01:00
|
|
|
Running test: testSyntaxErrorInFunction
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 2
|
|
|
|
exception : {
|
|
|
|
className : SyntaxError
|
2019-08-16 11:32:46 +02:00
|
|
|
description : SyntaxError: Unexpected token '}'
|
2016-12-23 16:30:57 +01:00
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 1
|
|
|
|
scriptId : <scriptId>
|
|
|
|
text : Uncaught
|
|
|
|
}
|
|
|
|
result : {
|
|
|
|
className : SyntaxError
|
2019-08-16 11:32:46 +02:00
|
|
|
description : SyntaxError: Unexpected token '}'
|
2016-12-23 16:30:57 +01:00
|
|
|
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>
|
2017-12-05 16:41:55 +01:00
|
|
|
stackTrace : {
|
|
|
|
callFrames : [
|
|
|
|
[0] : {
|
|
|
|
columnNumber : 21
|
|
|
|
functionName :
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url :
|
|
|
|
}
|
|
|
|
[1] : {
|
|
|
|
columnNumber : 35
|
|
|
|
functionName :
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url :
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2016-12-23 16:30:57 +01:00
|
|
|
text : Uncaught
|
|
|
|
}
|
|
|
|
result : {
|
|
|
|
className : Error
|
|
|
|
description : Error at <anonymous>:1:22 at <anonymous>:1:36
|
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testFunctionReturnNotPromise
|
|
|
|
{
|
2017-10-18 15:03:02 -07:00
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
description : 239
|
|
|
|
type : number
|
|
|
|
value : 239
|
|
|
|
}
|
|
|
|
}
|
2016-12-23 16:30:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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 : {
|
2019-09-24 11:56:38 -04:00
|
|
|
className : Object
|
|
|
|
description : Object
|
|
|
|
objectId : <objectId>
|
|
|
|
preview : {
|
|
|
|
description : Object
|
|
|
|
overflow : false
|
|
|
|
properties : [
|
|
|
|
[0] : {
|
|
|
|
name : a
|
|
|
|
type : number
|
|
|
|
value : 3
|
|
|
|
}
|
|
|
|
]
|
|
|
|
type : object
|
2016-12-23 16:30:57 +01:00
|
|
|
}
|
2019-09-24 11:56:38 -04:00
|
|
|
type : object
|
2016-12-23 16:30:57 +01:00
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 0
|
|
|
|
text : Uncaught (in promise)
|
|
|
|
}
|
|
|
|
result : {
|
|
|
|
type : object
|
|
|
|
value : {
|
|
|
|
a : 3
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-08-01 11:36:44 -05:00
|
|
|
}
|
2017-12-05 16:41:55 +01:00
|
|
|
|
|
|
|
Running test: testEvaluateOnExecutionContext
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
description : 70
|
|
|
|
type : number
|
|
|
|
value : 70
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-30 12:11:08 +02:00
|
|
|
Running test: testEvaluateOnUniqueExecutionContext
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
description : 70
|
|
|
|
type : number
|
|
|
|
value : 70
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-05 16:41:55 +01:00
|
|
|
Running test: testPassingBothObjectIdAndExecutionContextId
|
|
|
|
{
|
|
|
|
error : {
|
2023-03-30 12:11:08 +02:00
|
|
|
code : -32602
|
|
|
|
message : ObjectId, executionContextId and uniqueContextId must mutually exclude each other
|
|
|
|
}
|
|
|
|
id : <messageId>
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testPassingBothObjectIdAndExecutionContextUniqueId
|
|
|
|
{
|
|
|
|
error : {
|
|
|
|
code : -32602
|
|
|
|
message : ObjectId, executionContextId and uniqueContextId must mutually exclude each other
|
|
|
|
}
|
|
|
|
id : <messageId>
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testPassingTwoExecutionContextIds
|
|
|
|
{
|
|
|
|
error : {
|
|
|
|
code : -32602
|
|
|
|
message : ObjectId, executionContextId and uniqueContextId must mutually exclude each other
|
|
|
|
}
|
|
|
|
id : <messageId>
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testPassingNeitherContextIdNorObjectId
|
|
|
|
{
|
|
|
|
error : {
|
|
|
|
code : -32602
|
|
|
|
message : Either objectId or executionContextId or uniqueContextId must be specified
|
2017-12-05 16:41:55 +01:00
|
|
|
}
|
|
|
|
id : <messageId>
|
|
|
|
}
|
2019-09-24 11:56:38 -04:00
|
|
|
|
|
|
|
Running test: testThrowNumber
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 10
|
|
|
|
exception : {
|
|
|
|
description : 100500
|
|
|
|
type : number
|
|
|
|
value : 100500
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
stackTrace : {
|
|
|
|
callFrames : [
|
|
|
|
[0] : {
|
|
|
|
columnNumber : 10
|
|
|
|
functionName :
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url :
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
text : Uncaught
|
|
|
|
}
|
|
|
|
result : {
|
|
|
|
description : 100500
|
|
|
|
type : number
|
|
|
|
value : 100500
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testAsyncFunctionWithUnknownReferenceReturnByValue
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 30
|
|
|
|
exception : {
|
|
|
|
className : ReferenceError
|
|
|
|
description : ReferenceError: does_not_exist is not defined at <anonymous>:1:30
|
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 1
|
|
|
|
scriptId : <scriptId>
|
|
|
|
stackTrace : {
|
|
|
|
callFrames : [
|
|
|
|
[0] : {
|
|
|
|
columnNumber : 29
|
|
|
|
functionName :
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url :
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
text : Uncaught (in promise) ReferenceError: does_not_exist is not defined
|
|
|
|
}
|
|
|
|
result : {
|
|
|
|
type : object
|
|
|
|
value : {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|