2016-10-02 21:22:49 +00:00
|
|
|
Tests that Runtime.awaitPromise works.
|
|
|
|
|
|
|
|
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 : {
|
|
|
|
type : object
|
|
|
|
value : {
|
|
|
|
a : 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 0
|
|
|
|
text : Uncaught (in promise)
|
|
|
|
}
|
|
|
|
result : {
|
2016-10-02 21:22:49 +00:00
|
|
|
type : object
|
|
|
|
value : {
|
|
|
|
a : 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testRejectedPromiseWithStack
|
|
|
|
{
|
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-03 23:32:52 +00:00
|
|
|
type : number
|
|
|
|
value : 239
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-07 03:29:37 +00:00
|
|
|
Running test: testRejectedPromiseWithError
|
|
|
|
{
|
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 0
|
|
|
|
exception : {
|
|
|
|
className : Error
|
|
|
|
description : Error: MyError at rejectPromiseWithAnError (test.js:25:20) at <anonymous>:1:1
|
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 0
|
|
|
|
text : Uncaught (in promise) Error: MyError
|
|
|
|
}
|
|
|
|
result : {
|
|
|
|
className : Error
|
|
|
|
description : Error: MyError at rejectPromiseWithAnError (test.js:25:20) at <anonymous>:1:1
|
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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 : {
|
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: testResolvedWithoutArgsPromise
|
|
|
|
{
|
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 : undefined
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testGarbageCollectedPromise
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
error : {
|
|
|
|
code : -32000
|
|
|
|
message : Promise was collected
|
|
|
|
}
|
|
|
|
id : <messageId>
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|