blob: c3614872f113bfcb8c04dcdb1073f4e18c0da96a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// 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);
}
|