test: fix inspector tests after V8 upgrade

V8 improved break locations for the node --inspect-brk -e case.

PR-URL: https://github.com/nodejs/node/pull/21983
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
Alexey Kozyatinskiy 2018-05-11 13:47:45 -07:00 committed by Michaël Zasso
parent e6cdf24bb5
commit 19984ad7bb
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600
6 changed files with 6 additions and 7 deletions

View File

@ -14,7 +14,7 @@ setTimeout(() => {
`;
async function skipBreakpointAtStart(session) {
await session.waitForBreakOnLine(0, '[eval]');
await session.waitForBreakOnLine(3, '[eval]');
await session.send({ 'method': 'Debugger.resume' });
}

View File

@ -31,7 +31,7 @@ async function runTests() {
{ 'method': 'Runtime.runIfWaitingForDebugger' }
]);
await session.waitForBreakOnLine(0, '[eval]');
await session.waitForBreakOnLine(2, '[eval]');
await session.send({ 'method': 'Debugger.resume' });
console.error('[test] Waiting for break1');

View File

@ -10,7 +10,7 @@ const script = 'setInterval(() => { debugger; }, 50);';
async function skipFirstBreakpoint(session) {
console.log('[test]', 'Skipping the first breakpoint in the eval script');
await session.waitForBreakOnLine(0, '[eval]');
await session.waitForBreakOnLine(2, '[eval]');
await session.send({ 'method': 'Debugger.resume' });
}

View File

@ -1,7 +1,6 @@
// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
@ -15,7 +14,7 @@ async function runTests() {
{ 'method': 'Debugger.enable' },
{ 'method': 'Runtime.runIfWaitingForDebugger' }
]);
await session.waitForBreakOnLine(0, '[eval]');
await session.waitForBreakOnLine(2, '[eval]');
await session.runToCompletion();
assert.strictEqual(0, (await instance.expectShutdown()).exitCode);
}

View File

@ -29,7 +29,7 @@ async function testBreakpointOnStart(session) {
];
await session.send(commands);
await session.waitForBreakOnLine(0, script);
await session.waitForBreakOnLine(21, script);
}

View File

@ -51,7 +51,7 @@ async function runTests() {
{ 'method': 'Debugger.enable' },
{ 'method': 'Runtime.runIfWaitingForDebugger' }
]);
await session.waitForBreakOnLine(0, '[eval]');
await session.waitForBreakOnLine(4, '[eval]');
await session.send({ 'method': 'Runtime.enable' });
await getContext(session);