call-function-on-async-expected.txt 4.59 KB
Newer Older
1 2
Tests that Runtime.callFunctionOn works with awaitPromise flag.

3 4
Running test: prepareTestSuite

5 6
Running test: testArguments
{
7
    id : <messageId>
8
    result : {
9 10 11 12
        result : {
            type : string
            value : undefined|NaN|[object Object]|[object Object]
        }
13 14 15
    }
}

16 17 18 19 20 21 22 23 24 25 26
Running test: testUnserializableArguments
{
    id : <messageId>
    result : {
        result : {
            type : string
            value : true|true|true|true|bigint
        }
    }
}

27 28 29 30 31 32 33 34
Running test: testComplexArguments
{
    id : <messageId>
    result : {
        result : {
            type : string
            value : bar
        }
35 36 37 38 39
    }
}

Running test: testSyntaxErrorInFunction
{
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
    id : <messageId>
    result : {
        exceptionDetails : {
            columnNumber : 2
            exception : {
                className : SyntaxError
                description : SyntaxError: Unexpected token }
                objectId : <objectId>
                subtype : error
                type : object
            }
            exceptionId : <exceptionId>
            lineNumber : 1
            scriptId : <scriptId>
            text : Uncaught
        }
        result : {
57 58
            className : SyntaxError
            description : SyntaxError: Unexpected token }
59
            objectId : <objectId>
60 61 62 63 64 65 66 67
            subtype : error
            type : object
        }
    }
}

Running test: testExceptionInFunctionExpression
{
68 69 70 71 72 73 74 75 76 77 78 79 80 81
    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>
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
            stackTrace : {
                callFrames : [
                    [0] : {
                        columnNumber : 21
                        functionName : 
                        lineNumber : 0
                        scriptId : <scriptId>
                        url : 
                    }
                    [1] : {
                        columnNumber : 35
                        functionName : 
                        lineNumber : 0
                        scriptId : <scriptId>
                        url : 
                    }
                ]
            }
100 101 102
            text : Uncaught
        }
        result : {
103 104
            className : Error
            description : Error     at <anonymous>:1:22     at <anonymous>:1:36
105
            objectId : <objectId>
106 107 108 109 110 111 112 113
            subtype : error
            type : object
        }
    }
}

Running test: testFunctionReturnNotPromise
{
114 115 116
    id : <messageId>
    result : {
        result : {
117
            description : 239
118 119 120 121
            type : number
            value : 239
        }
    }
122 123 124 125
}

Running test: testFunctionReturnResolvedPromiseReturnByValue
{
126
    id : <messageId>
127
    result : {
128 129 130 131 132
        result : {
            type : object
            value : {
                a : 3
            }
133 134 135 136 137 138
        }
    }
}

Running test: testFunctionReturnResolvedPromiseWithPreview
{
139
    id : <messageId>
140
    result : {
141 142
        result : {
            className : Object
143
            description : Object
144 145 146 147 148 149 150 151 152 153 154 155 156
            objectId : <objectId>
            preview : {
                description : Object
                overflow : false
                properties : [
                    [0] : {
                        name : a
                        type : number
                        value : 3
                    }
                ]
                type : object
            }
157 158 159 160 161 162 163
            type : object
        }
    }
}

Running test: testFunctionReturnRejectedPromise
{
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
    id : <messageId>
    result : {
        exceptionDetails : {
            columnNumber : 0
            exception : {
                type : object
                value : {
                    a : 3
                }
            }
            exceptionId : <exceptionId>
            lineNumber : 0
            text : Uncaught (in promise)
        }
        result : {
179 180 181 182 183 184
            type : object
            value : {
                a : 3
            }
        }
    }
185
}
186 187 188 189 190 191

Running test: testEvaluateOnExecutionContext
{
    id : <messageId>
    result : {
        result : {
192
            description : 70
193 194 195 196 197 198 199 200 201 202 203 204 205 206
            type : number
            value : 70
        }
    }
}

Running test: testPassingBothObjectIdAndExecutionContextId
{
    error : {
        code : -32000
        message : ObjectId must not be specified together with executionContextId
    }
    id : <messageId>
}