v8/test/inspector/debugger/clear-breakpoints-on-disable.js
Alexey Kozyatinskiy f2fe13f663 [inspector] don't call clearAllBreakpoints
This call from inspector side is redundant, V8 will clear all breakpoints on removing debug delegate in v8::internal::Debug::Unload method.

In any case for correct support of multiclient we need to clear breakpoints in V8DebuggerAgentImpl::disable method.

R=dgozman@chromium.org

Bug: v8:5510,chromium:652939
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I66f9b97797860bad28884a099928d54ac3560428
Reviewed-on: https://chromium-review.googlesource.com/592281
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47022}
2017-07-31 21:23:27 +00:00

29 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 we clear breakpoints on agent disabled');
(async function test() {
session.setupScriptMap();
Protocol.Runtime.evaluate({expression: 'function foo() {}'});
Protocol.Debugger.enable();
let {params:{scriptId}} = await Protocol.Debugger.onceScriptParsed();
await Protocol.Debugger.setBreakpoint({
location: {
lineNumber: 0, columnNumber: 16, scriptId
}
});
Protocol.Runtime.evaluate({expression: 'foo()'});
var {params:{callFrames}} = await Protocol.Debugger.oncePaused();
await session.logSourceLocation(callFrames[0].location);
await Protocol.Debugger.disable();
await Protocol.Debugger.enable();
Protocol.Debugger.onPaused(InspectorTest.logMessage);
Protocol.Runtime.evaluate({expression: 'foo();debugger;'});
var {params:{callFrames}} = await Protocol.Debugger.oncePaused();
await session.logSourceLocation(callFrames[0].location);
InspectorTest.completeTest();
})()