v8/test/inspector/debugger/eval-without-codegen-expected.txt
Peter Marshall f510c66b96 inspector: Add flag to Runtime.evaluate() for unsafe eval
evaluate() bypassed CSP for unsafe-eval by default. This is a useful
option for debugging clients, but is not always what we want.

e.g. in the devtools console we want to match the page's CSP settings
to make debugging CSP issues on the page easier.

Add a toggle that keeps the current behavior by default.

Bug: chromium:1084558
Change-Id: Ia01142d5be00f8ef5f65e5eeba17549efc6f9120
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250245
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68432}
2020-06-19 10:24:20 +00:00

151 lines
3.5 KiB
Plaintext

Tests that evaluation works when code generation from strings is not allowed.
Running test: testEvaluateNotPaused
{
id : <messageId>
result : {
result : {
type : string
value : Global1
}
}
}
Running test: testEvaluatePaused
{
id : <messageId>
result : {
result : {
type : string
value : Global2
}
}
}
{
id : <messageId>
result : {
result : {
type : string
value : Local
}
}
}
Running test: testEvaluateUnsafeEval
{
id : <messageId>
result : {
result : {
description : 2
type : number
value : 2
}
}
}
{
id : <messageId>
result : {
result : {
description : 2
type : number
value : 2
}
}
}
Running test: testEvaluateUnsafeEvalDisableBypass
{
id : <messageId>
result : {
exceptionDetails : {
columnNumber : 0
exception : {
className : EvalError
description : EvalError: Code generation from strings disallowed for this context at <anonymous>:1:1
objectId : <objectId>
subtype : error
type : object
}
exceptionId : <exceptionId>
lineNumber : 0
scriptId : <scriptId>
stackTrace : {
callFrames : [
[0] : {
columnNumber : 0
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
}
]
}
text : Uncaught
}
result : {
className : EvalError
description : EvalError: Code generation from strings disallowed for this context at <anonymous>:1:1
objectId : <objectId>
subtype : error
type : object
}
}
}
{
id : <messageId>
result : {
exceptionDetails : {
columnNumber : 0
exception : {
className : EvalError
description : EvalError: Code generation from strings disallowed for this context at new Function (<anonymous>) at <anonymous>:1:1
objectId : <objectId>
subtype : error
type : object
}
exceptionId : <exceptionId>
lineNumber : 0
scriptId : <scriptId>
stackTrace : {
callFrames : [
[0] : {
columnNumber : 0
functionName :
lineNumber : 0
scriptId : <scriptId>
url :
}
]
}
text : Uncaught
}
result : {
className : EvalError
description : EvalError: Code generation from strings disallowed for this context at new Function (<anonymous>) at <anonymous>:1:1
objectId : <objectId>
subtype : error
type : object
}
}
}
Running test: testCallFunctionOn
{
id : <messageId>
result : {
result : {
description : 3
type : number
value : 3
}
}
}
{
id : <messageId>
result : {
result : {
type : undefined
}
}
}