0206ad773b
Since the same value is also returned in 'result' field it is still populated in accord with 'returnByValue' parameter. This behavior is consistent with 'evaluate'. R=dgozman@chromium.org, lushnikov@chromium.org Bug: v8:9509 Change-Id: I9f72682f87492ce5cd0759dce75ab3d75a5fe31c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1707331 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Yury Semikhatsky <yurys@chromium.org> Cr-Commit-Position: refs/heads/master@{#63134}
204 lines
4.5 KiB
Plaintext
204 lines
4.5 KiB
Plaintext
Tests that Runtime.compileScript and Runtime.runScript work with awaitPromise flag.
|
|
|
|
Running test: testRunAndCompileWithoutAgentEnable
|
|
{
|
|
error : {
|
|
code : -32000
|
|
message : Runtime agent is not enabled
|
|
}
|
|
id : <messageId>
|
|
}
|
|
{
|
|
error : {
|
|
code : -32000
|
|
message : Runtime agent is not enabled
|
|
}
|
|
id : <messageId>
|
|
}
|
|
|
|
Running test: testSyntaxErrorInScript
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
exceptionDetails : {
|
|
columnNumber : 1
|
|
exception : {
|
|
className : SyntaxError
|
|
description : SyntaxError: Unexpected token '}'
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 1
|
|
scriptId : <scriptId>
|
|
text : Uncaught
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testSyntaxErrorInEvalInScript
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
exceptionDetails : {
|
|
columnNumber : 0
|
|
exception : {
|
|
className : SyntaxError
|
|
description : SyntaxError: Unexpected token '}' at boo.js:2:2
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
stackTrace : {
|
|
callFrames : [
|
|
[0] : {
|
|
columnNumber : 1
|
|
functionName :
|
|
lineNumber : 1
|
|
scriptId : <scriptId>
|
|
url : boo.js
|
|
}
|
|
]
|
|
}
|
|
text : Uncaught
|
|
}
|
|
result : {
|
|
className : SyntaxError
|
|
description : SyntaxError: Unexpected token '}' at boo.js:2:2
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testRunNotCompiledScript
|
|
{
|
|
error : {
|
|
code : -32000
|
|
message : No script with given id
|
|
}
|
|
id : <messageId>
|
|
}
|
|
|
|
Running test: testRunCompiledScriptAfterAgentWasReenabled
|
|
{
|
|
error : {
|
|
code : -32000
|
|
message : Runtime agent is not enabled
|
|
}
|
|
id : <messageId>
|
|
}
|
|
{
|
|
error : {
|
|
code : -32000
|
|
message : No script with given id
|
|
}
|
|
id : <messageId>
|
|
}
|
|
|
|
Running test: testRunScriptWithPreview
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Object
|
|
overflow : false
|
|
properties : [
|
|
[0] : {
|
|
name : a
|
|
type : number
|
|
value : 1
|
|
}
|
|
]
|
|
type : object
|
|
}
|
|
type : object
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testRunScriptReturnByValue
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
type : object
|
|
value : {
|
|
a : 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testAwaitNotPromise
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
type : object
|
|
value : {
|
|
a : 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testAwaitResolvedPromise
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
type : object
|
|
value : {
|
|
a : 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testAwaitRejectedPromise
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
exceptionDetails : {
|
|
columnNumber : 0
|
|
exception : {
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Object
|
|
overflow : false
|
|
properties : [
|
|
[0] : {
|
|
name : a
|
|
type : number
|
|
value : 1
|
|
}
|
|
]
|
|
type : object
|
|
}
|
|
type : object
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 0
|
|
text : Uncaught (in promise)
|
|
}
|
|
result : {
|
|
type : object
|
|
value : {
|
|
a : 1
|
|
}
|
|
}
|
|
}
|
|
}
|