2016-10-02 21:22:49 +00:00
|
|
|
Tests that Runtime.compileScript and Runtime.runScript work with awaitPromise flag.
|
|
|
|
|
|
|
|
Running test: testRunAndCompileWithoutAgentEnable
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
error : {
|
|
|
|
code : -32000
|
|
|
|
message : Runtime agent is not enabled
|
|
|
|
}
|
|
|
|
id : <messageId>
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
error : {
|
|
|
|
code : -32000
|
|
|
|
message : Runtime agent is not enabled
|
|
|
|
}
|
|
|
|
id : <messageId>
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testSyntaxErrorInScript
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 1
|
|
|
|
exception : {
|
|
|
|
className : SyntaxError
|
2019-06-06 19:35:53 +00:00
|
|
|
description : SyntaxError: Unexpected token '}'
|
2016-10-03 23:32:52 +00:00
|
|
|
objectId : <objectId>
|
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 1
|
|
|
|
scriptId : <scriptId>
|
|
|
|
text : Uncaught
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testSyntaxErrorInEvalInScript
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 0
|
|
|
|
exception : {
|
|
|
|
className : SyntaxError
|
2019-06-06 19:35:53 +00:00
|
|
|
description : SyntaxError: Unexpected token '}' at boo.js:2:2
|
2016-10-03 23:32:52 +00:00
|
|
|
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 : {
|
2016-10-02 21:22:49 +00:00
|
|
|
className : SyntaxError
|
2019-06-06 19:35:53 +00:00
|
|
|
description : SyntaxError: Unexpected token '}' at boo.js:2:2
|
2016-10-03 23:32:52 +00:00
|
|
|
objectId : <objectId>
|
2016-10-02 21:22:49 +00:00
|
|
|
subtype : error
|
|
|
|
type : object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testRunNotCompiledScript
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
error : {
|
|
|
|
code : -32000
|
|
|
|
message : No script with given id
|
|
|
|
}
|
|
|
|
id : <messageId>
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testRunCompiledScriptAfterAgentWasReenabled
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
error : {
|
|
|
|
code : -32000
|
|
|
|
message : Runtime agent is not enabled
|
|
|
|
}
|
|
|
|
id : <messageId>
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
error : {
|
|
|
|
code : -32000
|
|
|
|
message : No script with given id
|
|
|
|
}
|
|
|
|
id : <messageId>
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testRunScriptWithPreview
|
|
|
|
{
|
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 : {
|
|
|
|
className : Object
|
2016-10-02 21:22:49 +00:00
|
|
|
description : Object
|
2016-10-03 23:32:52 +00:00
|
|
|
objectId : <objectId>
|
|
|
|
preview : {
|
|
|
|
description : Object
|
|
|
|
overflow : false
|
|
|
|
properties : [
|
|
|
|
[0] : {
|
|
|
|
name : a
|
|
|
|
type : number
|
|
|
|
value : 1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
type : object
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
type : object
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testRunScriptReturnByValue
|
|
|
|
{
|
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 : object
|
|
|
|
value : {
|
|
|
|
a : 1
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testAwaitNotPromise
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
2017-08-14 22:21:45 +00:00
|
|
|
result : {
|
|
|
|
result : {
|
|
|
|
type : object
|
|
|
|
value : {
|
|
|
|
a : 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testAwaitResolvedPromise
|
|
|
|
{
|
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 : object
|
|
|
|
value : {
|
|
|
|
a : 1
|
|
|
|
}
|
2016-10-02 21:22:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Running test: testAwaitRejectedPromise
|
|
|
|
{
|
2016-10-03 23:32:52 +00:00
|
|
|
id : <messageId>
|
|
|
|
result : {
|
|
|
|
exceptionDetails : {
|
|
|
|
columnNumber : 0
|
|
|
|
exception : {
|
2019-08-07 21:35:26 +00:00
|
|
|
className : Object
|
|
|
|
description : Object
|
|
|
|
objectId : <objectId>
|
|
|
|
preview : {
|
|
|
|
description : Object
|
|
|
|
overflow : false
|
|
|
|
properties : [
|
|
|
|
[0] : {
|
|
|
|
name : a
|
|
|
|
type : number
|
|
|
|
value : 1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
type : object
|
2016-10-03 23:32:52 +00:00
|
|
|
}
|
2019-08-07 21:35:26 +00:00
|
|
|
type : object
|
2016-10-03 23:32:52 +00:00
|
|
|
}
|
|
|
|
exceptionId : <exceptionId>
|
|
|
|
lineNumber : 0
|
|
|
|
text : Uncaught (in promise)
|
|
|
|
}
|
|
|
|
result : {
|
2016-10-02 21:22:49 +00:00
|
|
|
type : object
|
|
|
|
value : {
|
|
|
|
a : 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-04-12 19:02:58 +00:00
|
|
|
}
|