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.
  • Loading branch information
alexkozy authored and targos committed Jul 2, 2018
1 parent ed0bc6e commit 2798eb1
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 @@ -15,7 +15,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 @@ -32,7 +32,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 @@ -11,7 +11,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();
common.crashOnUnhandledRejection();

Expand All @@ -16,7 +15,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 @@ -52,7 +52,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 2798eb1

Please sign in to comment.