Skip to content

Commit

Permalink
test: fix inspector tests after V8 upgrade
Browse files Browse the repository at this point in the history
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
alexkozy authored and targos committed Sep 7, 2018
1 parent e6cdf24 commit 19984ad
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
}

Expand Down
3 changes: 1 addition & 2 deletions test/sequential/test-inspector-break-e.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Flags: --expose-internals
'use strict';
const common = require('../common');

common.skipIfInspectorDisabled();

const assert = require('assert');
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function testBreakpointOnStart(session) {
];

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


Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-scriptparsed-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 19984ad

Please sign in to comment.