node/deps/v8/test/inspector/debugger/set-skip-all-pauses.js
Michaël Zasso d82e1075db
deps: update V8 to 6.1.534.36
PR-URL: https://github.com/nodejs/node/pull/14730
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-09-13 16:15:18 +02:00

32 lines
1.1 KiB
JavaScript

// Copyright 2017 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 Debugger.setSkipAllPauses skips breaks and does not block resumed notifications');
session.setupScriptMap();
(async function test() {
await Protocol.Debugger.enable();
Protocol.Runtime.evaluate({expression: 'debugger;'});
await waitForPause();
await Protocol.Debugger.resume();
await Protocol.Debugger.setSkipAllPauses({skip: true});
await Protocol.Runtime.evaluate({expression: 'debugger'});
await Protocol.Debugger.setSkipAllPauses({skip: false});
Protocol.Runtime.evaluate({expression: 'debugger'});
await waitForPause();
Protocol.Debugger.setSkipAllPauses({skip: true});
Protocol.Debugger.resume();
await Protocol.Debugger.onceResumed();
InspectorTest.completeTest();
})();
async function waitForPause() {
var message = await Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
session.logSourceLocation(message.params.callFrames[0].location);
}