// Copyright 2018 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('Checks that it is possible to disable agent on pause.');contextGroup.addScript(`function foo() { return 42;}`,0,0,'test.js');(asyncfunctiontest(){Protocol.Debugger.enable();InspectorTest.log('set breakpoint, call foo, wait for pause..');let{result:{breakpointId}}=awaitProtocol.Debugger.setBreakpointByUrl({lineNumber:2,url:'test.js'});constfinished=Protocol.Runtime.evaluate({expression:'foo()//# sourceURL=expr.js'});const{params:{callFrames:[topFrame]}}=awaitProtocol.Debugger.oncePaused();InspectorTest.log('disable agent..');Protocol.Debugger.disable();awaitfinished;InspectorTest.log('call finished');InspectorTest.completeTest();})();