v8/test/inspector/debugger/set-skip-all-pauses.js
dgozman 375bea1c45 [inspector] Support multiple sessions per context group
This patch adds ability to connect multiple sessions to a single context group. This is an experimental feature, which is already supported in test harness.

So far covered runtime domain with tests (and found a bug thanks to the test). More tests to follow in next patches, probably with code adjustments as well.

BUG=chromium:590878

Review-Url: https://codereview.chromium.org/2906153002
Cr-Commit-Position: refs/heads/master@{#45667}
2017-06-01 21:33:59 +00: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);
}