await-promise-expected.txt 2.78 KB
Newer Older
1 2 3 4
Tests that Runtime.awaitPromise works.

Running test: testResolvedPromise
{
5
    id : <messageId>
6
    result : {
7
        result : {
8
            description : 239
9 10 11
            type : number
            value : 239
        }
12 13 14 15 16
    }
}

Running test: testRejectedPromise
{
17 18 19 20 21
    id : <messageId>
    result : {
        exceptionDetails : {
            columnNumber : 0
            exception : {
22 23 24 25 26 27 28 29 30 31 32 33 34 35
                className : Object
                description : Object
                objectId : <objectId>
                preview : {
                    description : Object
                    overflow : false
                    properties : [
                        [0] : {
                            name : a
                            type : number
                            value : 1
                        }
                    ]
                    type : object
36
                }
37
                type : object
38 39 40 41 42 43
            }
            exceptionId : <exceptionId>
            lineNumber : 0
            text : Uncaught (in promise)
        }
        result : {
44 45 46 47 48 49 50 51 52 53
            type : object
            value : {
                a : 1
            }
        }
    }
}

Running test: testRejectedPromiseWithStack
{
54 55 56 57 58
    id : <messageId>
    result : {
        exceptionDetails : {
            columnNumber : 0
            exception : {
59
                description : 239
60 61 62 63 64 65 66 67
                type : number
                value : 239
            }
            exceptionId : <exceptionId>
            lineNumber : 0
            text : Uncaught (in promise)
        }
        result : {
68
            description : 239
69 70
            type : number
            value : 239
71 72 73 74
        }
    }
}

75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
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
        }
    }
}

102 103
Running test: testPendingPromise
{
104
    id : <messageId>
105
    result : {
106
        result : {
107
            description : 239
108 109 110
            type : number
            value : 239
        }
111 112 113 114 115
    }
}

Running test: testResolvedWithoutArgsPromise
{
116
    id : <messageId>
117
    result : {
118 119 120
        result : {
            type : undefined
        }
121 122
    }
}