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 : {
|
|
|
|
description : 239
|
|
|
|
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
|
|
|
|
stackTrace : {
|
|
|
|
callFrames : [
|
|
|
|
]
|
2017-01-10 12:54:12 +00:00
|
|
|
parent : {
|
|
|
|
callFrames : [
|
|
|
|
[0] : {
|
|
|
|
columnNumber : 8
|
|
|
|
functionName :
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url :
|
|
|
|
}
|
|
|
|
]
|
|
|
|
description : Promise.reject
|
|
|
|
}
|
2016-10-03 23:32:52 +00:00
|
|
|
}
|
|
|
|
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 : {
|
|
|
|
description : 239
|
|
|
|
type : number
|
|
|
|
value : 239
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 0
|
|
|
|
stackTrace : {
|
2016-10-02 21:22:49 +00:00
|
|
|
callFrames : [
|
|
|
|
]
|
2016-10-03 23:32:52 +00:00
|
|
|
parent : {
|
|
|
|
callFrames : [
|
|
|
|
[0] : {
|
|
|
|
columnNumber : 4
|
|
|
|
functionName : rejectPromise
|
|
|
|
lineNumber : 17
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url : test.js
|
|
|
|
}
|
|
|
|
[1] : {
|
|
|
|
columnNumber : 0
|
|
|
|
functionName :
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url :
|
|
|
|
}
|
|
|
|
]
|
|
|
|
description : Promise.reject
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
2016-10-03 23:32:52 +00:00
|
|
|
text : Uncaught (in promise)
|
|
|
|
}
|
|
|
|
result : {
|
|
|
|
description : 239
|
|
|
|
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
|
|
|
|
stackTrace : {
|
|
|
|
callFrames : [
|
|
|
|
]
|
|
|
|
parent : {
|
|
|
|
callFrames : [
|
|
|
|
[0] : {
|
|
|
|
columnNumber : 4
|
|
|
|
functionName : rejectPromiseWithAnError
|
|
|
|
lineNumber : 24
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url : test.js
|
|
|
|
}
|
|
|
|
[1] : {
|
|
|
|
columnNumber : 0
|
|
|
|
functionName :
|
|
|
|
lineNumber : 0
|
|
|
|
scriptId : <scriptId>
|
|
|
|
url :
|
|
|
|
}
|
|
|
|
]
|
|
|
|
description : Promise.reject
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 : {
|
|
|
|
description : 239
|
|
|
|
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
|
|
|
}
|