Skip to content
Permalink
Browse files

test: fix inspector tests after V8 upgrade

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

PR-URL: #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>
  • Loading branch information...
ak239 authored and targos committed May 11, 2018
1 parent e6cdf24 commit 19984ad7bb96b300037c90059d231e4b6cba5bd1
@@ -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' });
}

@@ -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');
@@ -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' });
}

@@ -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);
}
@@ -29,7 +29,7 @@ async function testBreakpointOnStart(session) {
];

await session.send(commands);
await session.waitForBreakOnLine(0, script);
await session.waitForBreakOnLine(21, script);
}


@@ -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);

0 comments on commit 19984ad

Please sign in to comment.
You can’t perform that action at this time.