diff options
Diffstat (limited to 'deps/v8/test/inspector/runtime')
12 files changed, 319 insertions, 9 deletions
diff --git a/deps/v8/test/inspector/runtime/await-promise-expected.txt b/deps/v8/test/inspector/runtime/await-promise-expected.txt index 2b906dd49b..975ef8177e 100644 --- a/deps/v8/test/inspector/runtime/await-promise-expected.txt +++ b/deps/v8/test/inspector/runtime/await-promise-expected.txt @@ -19,10 +19,22 @@ Running test: testRejectedPromise exceptionDetails : { columnNumber : 0 exception : { - type : object - value : { - a : 1 + 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 diff --git a/deps/v8/test/inspector/runtime/call-function-on-async-expected.txt b/deps/v8/test/inspector/runtime/call-function-on-async-expected.txt index 1a64b576c3..f98fc43bf9 100644 --- a/deps/v8/test/inspector/runtime/call-function-on-async-expected.txt +++ b/deps/v8/test/inspector/runtime/call-function-on-async-expected.txt @@ -166,10 +166,22 @@ Running test: testFunctionReturnRejectedPromise exceptionDetails : { columnNumber : 0 exception : { - type : object - value : { - a : 3 + className : Object + description : Object + objectId : <objectId> + preview : { + description : Object + overflow : false + properties : [ + [0] : { + name : a + type : number + value : 3 + } + ] + type : object } + type : object } exceptionId : <exceptionId> lineNumber : 0 @@ -204,3 +216,75 @@ Running test: testPassingBothObjectIdAndExecutionContextId } id : <messageId> } + +Running test: testThrowNumber +{ + id : <messageId> + result : { + exceptionDetails : { + columnNumber : 10 + exception : { + description : 100500 + type : number + value : 100500 + } + exceptionId : <exceptionId> + lineNumber : 0 + scriptId : <scriptId> + stackTrace : { + callFrames : [ + [0] : { + columnNumber : 10 + functionName : + lineNumber : 0 + scriptId : <scriptId> + url : + } + ] + } + text : Uncaught + } + result : { + description : 100500 + type : number + value : 100500 + } + } +} + +Running test: testAsyncFunctionWithUnknownReferenceReturnByValue +{ + id : <messageId> + result : { + exceptionDetails : { + columnNumber : 30 + exception : { + className : ReferenceError + description : ReferenceError: does_not_exist is not defined at <anonymous>:1:30 + objectId : <objectId> + subtype : error + type : object + } + exceptionId : <exceptionId> + lineNumber : 1 + scriptId : <scriptId> + stackTrace : { + callFrames : [ + [0] : { + columnNumber : 29 + functionName : + lineNumber : 0 + scriptId : <scriptId> + url : + } + ] + } + text : Uncaught (in promise) ReferenceError: does_not_exist is not defined + } + result : { + type : object + value : { + } + } + } +} diff --git a/deps/v8/test/inspector/runtime/call-function-on-async.js b/deps/v8/test/inspector/runtime/call-function-on-async.js index ab146e1c4d..70f823c52c 100644 --- a/deps/v8/test/inspector/runtime/call-function-on-async.js +++ b/deps/v8/test/inspector/runtime/call-function-on-async.js @@ -146,6 +146,28 @@ let testSuite = [ awaitPromise: false })); }, + + async function testThrowNumber() { + InspectorTest.logMessage(await callFunctionOn({ + executionContextId, + functionDeclaration: '(() => { throw 100500; } )', + arguments: prepareArguments([]), + returnByValue: true, + generatePreview: false, + awaitPromise: true + })); + }, + + async function testAsyncFunctionWithUnknownReferenceReturnByValue() { + InspectorTest.logMessage(await callFunctionOn({ + executionContextId, + functionDeclaration: '(async () => does_not_exist.click())', + arguments: prepareArguments([]), + returnByValue: true, + generatePreview: false, + awaitPromise: true + })); + }, ]; function prepareArguments(args) { diff --git a/deps/v8/test/inspector/runtime/console-table-expected.txt b/deps/v8/test/inspector/runtime/console-table-expected.txt index e00708b587..aa6b456b93 100644 --- a/deps/v8/test/inspector/runtime/console-table-expected.txt +++ b/deps/v8/test/inspector/runtime/console-table-expected.txt @@ -383,3 +383,97 @@ preview: type : object } +{ + description : Array(2) + overflow : false + properties : [ + [0] : { + name : 0 + type : object + value : Object + valuePreview : { + description : Object + overflow : false + properties : [ + [0] : { + name : c + type : number + value : 3 + } + [1] : { + name : b + type : number + value : 2 + } + ] + type : object + } + } + [1] : { + name : 1 + type : object + value : Object + valuePreview : { + description : Object + overflow : false + properties : [ + [0] : { + name : c + type : number + value : 3 + } + ] + type : object + } + } + ] + subtype : array + type : object +} +{ + description : Array(2) + overflow : false + properties : [ + [0] : { + name : 0 + type : object + value : Object + valuePreview : { + description : Object + overflow : false + properties : [ + [0] : { + name : c + type : number + value : 3 + } + [1] : { + name : b + type : number + value : 2 + } + ] + type : object + } + } + [1] : { + name : 1 + type : object + value : Object + valuePreview : { + description : Object + overflow : false + properties : [ + [0] : { + name : c + type : number + value : 3 + } + ] + type : object + } + } + ] + subtype : array + type : object +} diff --git a/deps/v8/test/inspector/runtime/console-table.js b/deps/v8/test/inspector/runtime/console-table.js index 70e3548c14..961499dfac 100644 --- a/deps/v8/test/inspector/runtime/console-table.js +++ b/deps/v8/test/inspector/runtime/console-table.js @@ -65,6 +65,18 @@ const { session, contextGroup, Protocol } = console.table(bigTable);` }); await waitConsoleAPICalledAndDump(true /* concise */); + Protocol.Runtime.evaluate({ + expression: `var table = [{a:1, b:2, c:3}, {c:3}]; + var filter = ['c', 'b']; + console.table(table, filter);` + }); + await waitConsoleAPICalledAndDump(); + Protocol.Runtime.evaluate({ + expression: `var table = [{a:1, b:2, c:3}, {c:3}]; + var filter = ['c', 'b', 'c']; + console.table(table, filter);` + }); + await waitConsoleAPICalledAndDump(); InspectorTest.completeTest(); })() diff --git a/deps/v8/test/inspector/runtime/evaluate-new-function-error-expected.txt b/deps/v8/test/inspector/runtime/evaluate-new-function-error-expected.txt new file mode 100644 index 0000000000..70191eac96 --- /dev/null +++ b/deps/v8/test/inspector/runtime/evaluate-new-function-error-expected.txt @@ -0,0 +1,27 @@ +Tests that Runtime.evaluate has the correct error line number for 'new Function(...)' +{ + id : <messageId> + result : { + exceptionDetails : { + columnNumber : 3 + exception : { + className : TypeError + description : TypeError: 0 is not a function at eval (eval at <anonymous> (:1:1), <anonymous>:1:4) at <anonymous>:1:22 + objectId : <objectId> + subtype : error + type : object + } + exceptionId : <exceptionId> + lineNumber : 0 + scriptId : <scriptId> + text : Uncaught + } + result : { + className : TypeError + description : TypeError: 0 is not a function at eval (eval at <anonymous> (:1:1), <anonymous>:1:4) at <anonymous>:1:22 + objectId : <objectId> + subtype : error + type : object + } + } +} diff --git a/deps/v8/test/inspector/runtime/evaluate-new-function-error.js b/deps/v8/test/inspector/runtime/evaluate-new-function-error.js new file mode 100644 index 0000000000..bb878d957a --- /dev/null +++ b/deps/v8/test/inspector/runtime/evaluate-new-function-error.js @@ -0,0 +1,11 @@ +// Copyright 2019 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +let {session, contextGroup, Protocol} = InspectorTest.start("Tests that Runtime.evaluate has the correct error line number for 'new Function(...)'"); + +var message = { expression: "new Function('(0)()')();" }; + +Protocol.Runtime.evaluate(message) + .then(message => InspectorTest.logMessage(message)) + .then(() => InspectorTest.completeTest()); diff --git a/deps/v8/test/inspector/runtime/remote-object-expected.txt b/deps/v8/test/inspector/runtime/remote-object-expected.txt index d05401ddfb..98fe47beed 100644 --- a/deps/v8/test/inspector/runtime/remote-object-expected.txt +++ b/deps/v8/test/inspector/runtime/remote-object-expected.txt @@ -1436,6 +1436,18 @@ Running test: testCustomError } } +Running test: testCustomErrorWithMessage +'class CustomMsgError extends Error {}; a = new CustomMsgError(); delete a.stack; a.message = 'foobar'; a', returnByValue: false, generatePreview: false +{ + result : { + className : CustomMsgError + description : CustomMsgError: foobar + objectId : <objectId> + subtype : error + type : object + } +} + Running test: testProxy 'new Proxy({}, {})', returnByValue: false, generatePreview: false { diff --git a/deps/v8/test/inspector/runtime/remote-object.js b/deps/v8/test/inspector/runtime/remote-object.js index ed35f0eff6..78926479ae 100644 --- a/deps/v8/test/inspector/runtime/remote-object.js +++ b/deps/v8/test/inspector/runtime/remote-object.js @@ -419,6 +419,11 @@ InspectorTest.runAsyncTestSuite([ expression: `class CustomError extends Error {}; a = new CustomError(); delete a.stack; a` })).result); }, + async function testCustomErrorWithMessage() { + InspectorTest.logMessage((await evaluate( { + expression: `class CustomMsgError extends Error {}; a = new CustomMsgError(); delete a.stack; a.message = 'foobar'; a` + })).result); + }, async function testProxy() { InspectorTest.logMessage((await evaluate({ expression: 'new Proxy({}, {})' diff --git a/deps/v8/test/inspector/runtime/run-script-async-expected.txt b/deps/v8/test/inspector/runtime/run-script-async-expected.txt index 8befa1399c..5b94305081 100644 --- a/deps/v8/test/inspector/runtime/run-script-async-expected.txt +++ b/deps/v8/test/inspector/runtime/run-script-async-expected.txt @@ -172,10 +172,22 @@ Running test: testAwaitRejectedPromise exceptionDetails : { columnNumber : 0 exception : { - type : object - value : { - a : 1 + 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 diff --git a/deps/v8/test/inspector/runtime/terminate-execution-expected.txt b/deps/v8/test/inspector/runtime/terminate-execution-expected.txt index 24df70ebb6..614dc6da1e 100644 --- a/deps/v8/test/inspector/runtime/terminate-execution-expected.txt +++ b/deps/v8/test/inspector/runtime/terminate-execution-expected.txt @@ -64,3 +64,10 @@ Pause inside microtask and terminate execution } } } +Terminate execution with pending microtasks +{ + id : <messageId> + result : { + } +} + diff --git a/deps/v8/test/inspector/runtime/terminate-execution.js b/deps/v8/test/inspector/runtime/terminate-execution.js index feaf52eb2c..8af28e4787 100644 --- a/deps/v8/test/inspector/runtime/terminate-execution.js +++ b/deps/v8/test/inspector/runtime/terminate-execution.js @@ -55,6 +55,18 @@ let {session, contextGroup, Protocol} = .then(InspectorTest.logMessage); await Protocol.Debugger.disable(); + InspectorTest.log('Terminate execution with pending microtasks'); + Protocol.Debugger.enable(); + const paused2 = Protocol.Debugger.oncePaused(); + Protocol.Runtime.evaluate({expression: ` + Promise.resolve().then(() => { console.log('FAIL: microtask ran'); }); + debugger; + for (;;) {} + `}); + await paused2; + Protocol.Runtime.terminateExecution().then(InspectorTest.logMessage); + await Protocol.Debugger.resume(); + await Protocol.Runtime.disable(); InspectorTest.completeTest(); })(); |