2016-10-02 21:22:49 +00:00
|
|
|
Tests that Runtime.evaluate works with awaitPromise flag.
|
|
|
|
|
|
|
|
Running test: testResolvedPromise
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
2016-10-02 21:22:49 +00:00
|
|
|
result : {
|
2016-10-03 23:32:52 +00:00
|
|
|
result : {
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 239
|
2016-10-03 23:32:52 +00:00
|
|
|
type : number
|
|
|
|
value : 239
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testRejectedPromise
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 0
|
|
|
|
exception : {
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 239
|
2016-10-03 23:32:52 +00:00
|
|
|
type : number
|
|
|
|
value : 239
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 0
|
|
|
|
text : Uncaught (in promise)
|
|
|
|
}
|
|
|
|
result : {
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 239
|
2016-10-02 21:22:49 +00:00
|
|
|
type : number
|
|
|
|
value : 239
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-07 03:29:37 +00:00
|
|
|
Running test: testRejectedPromiseWithError
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 11
|
|
|
|
exception : {
|
|
|
|
className : Error
|
2017-11-30 15:27:59 +00:00
|
|
|
description : Error: MyError at foo (<anonymous>:13:11) at throwError (<anonymous>:15:3)
|
2017-07-07 03:29:37 +00:00
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 13
|
|
|
|
scriptId : <scriptId>
|
|
|
|
stackTrace : {
|
|
|
|
callFrames : [
|
|
|
|
[0] : {
|
|
|
|
columnNumber : 10
|
|
|
|
functionName : foo
|
|
|
|
lineNumber : 12
|
|
|
|
scriptId : <scriptId>
|
2017-11-30 15:27:59 +00:00
|
|
|
url :
|
2017-07-07 03:29:37 +00:00
|
|
|
}
|
|
|
|
[1] : {
|
|
|
|
columnNumber : 2
|
|
|
|
functionName : throwError
|
|
|
|
lineNumber : 14
|
|
|
|
scriptId : <scriptId>
|
2017-11-30 15:27:59 +00:00
|
|
|
url :
|
2017-07-07 03:29:37 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
text : Uncaught (in promise) Error: MyError
|
|
|
|
}
|
|
|
|
result : {
|
|
|
|
className : Error
|
2017-11-30 15:27:59 +00:00
|
|
|
description : Error: MyError at foo (<anonymous>:13:11) at throwError (<anonymous>:15:3)
|
2017-07-07 03:29:37 +00:00
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testRejectedPromiseWithSyntaxError
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 5
|
|
|
|
exception : {
|
|
|
|
className : SyntaxError
|
2019-06-06 19:35:53 +00:00
|
|
|
description : SyntaxError: Unexpected token '}' at foo (<anonymous>:21:5) at throwSyntaxError (<anonymous>:23:3)
|
2017-07-07 03:29:37 +00:00
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 21
|
|
|
|
scriptId : <scriptId>
|
|
|
|
stackTrace : {
|
|
|
|
callFrames : [
|
|
|
|
[0] : {
|
|
|
|
columnNumber : 4
|
|
|
|
functionName : foo
|
|
|
|
lineNumber : 20
|
|
|
|
scriptId : <scriptId>
|
2017-11-30 15:27:59 +00:00
|
|
|
url :
|
2017-07-07 03:29:37 +00:00
|
|
|
}
|
|
|
|
[1] : {
|
|
|
|
columnNumber : 2
|
|
|
|
functionName : throwSyntaxError
|
|
|
|
lineNumber : 22
|
|
|
|
scriptId : <scriptId>
|
2017-11-30 15:27:59 +00:00
|
|
|
url :
|
2017-07-07 03:29:37 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2019-06-06 19:35:53 +00:00
|
|
|
text : Uncaught (in promise) SyntaxError: Unexpected token '}'
|
2017-07-07 03:29:37 +00:00
|
|
|
}
|
|
|
|
result : {
|
|
|
|
className : SyntaxError
|
2019-06-06 19:35:53 +00:00
|
|
|
description : SyntaxError: Unexpected token '}' at foo (<anonymous>:21:5) at throwSyntaxError (<anonymous>:23:3)
|
2017-07-07 03:29:37 +00:00
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-02 21:22:49 +00:00
|
|
|
Running test: testPrimitiveValueInsteadOfPromise
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
2017-08-14 22:21:45 +00:00
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
type : boolean
|
|
|
|
value : true
|
|
|
|
}
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testObjectInsteadOfPromise
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
2017-08-14 22:21:45 +00:00
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
type : object
|
|
|
|
value : {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testPendingPromise
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
2016-10-02 21:22:49 +00:00
|
|
|
result : {
|
2016-10-03 23:32:52 +00:00
|
|
|
result : {
|
|
|
|
type : object
|
|
|
|
value : {
|
|
|
|
a : 239
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testExceptionInEvaluate
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 0
|
|
|
|
exception : {
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 239
|
2016-10-03 23:32:52 +00:00
|
|
|
type : number
|
|
|
|
value : 239
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
text : Uncaught
|
|
|
|
}
|
|
|
|
result : {
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 239
|
2016-10-02 21:22:49 +00:00
|
|
|
type : number
|
|
|
|
value : 239
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-08-02 20:28:25 +00:00
|
|
|
|
2017-08-14 22:21:45 +00:00
|
|
|
Running test: testThenableJob
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 42
|
2017-08-14 22:21:45 +00:00
|
|
|
type : number
|
|
|
|
value : 42
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-02 20:28:25 +00:00
|
|
|
Running test: testLastEvaluatedResult
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 42
|
2017-08-02 20:28:25 +00:00
|
|
|
type : number
|
|
|
|
value : 42
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
2018-05-31 18:51:49 +00:00
|
|
|
description : 42
|
2017-08-02 20:28:25 +00:00
|
|
|
type : number
|
|
|
|
value : 42
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-08-10 05:43:50 +00:00
|
|
|
|
|
|
|
Running test: testRuntimeDisable
|
|
|
|
Resolving promise..
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
className : Object
|
|
|
|
description : Object
|
|
|
|
objectId : <objectId>
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Promise resolved
|
|
|
|
|
|
|
|
Running test: testImmediatelyResolvedAfterAfterContextDestroyed
|
|
|
|
Destroying context..
|
|
|
|
{
|
|
|
|
error : {
|
|
|
|
code : -32000
|
|
|
|
message : Execution context was destroyed.
|
|
|
|
}
|
|
|
|
id : <messageId>
|
|
|
|
}
|
|
|
|
Context destroyed
|
2017-08-11 17:36:26 +00:00
|
|
|
Triggering weak callback..
|