Index: test/inspector/debugger/inspector-break-api.js |
diff --git a/test/inspector/debugger/inspector-break-api.js b/test/inspector/debugger/inspector-break-api.js |
index 178da5b0279e9834f319bbd7807adddbe7f23b24..dc39924200992a44960bc67102647f4eee3924b1 100644 |
--- a/test/inspector/debugger/inspector-break-api.js |
+++ b/test/inspector/debugger/inspector-break-api.js |
@@ -2,9 +2,9 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-InspectorTest.log("Checks breakProgram,(schedule|cancel)PauseOnNextStatement test API"); |
+let {session, contextGroup, Protocol} = InspectorTest.start("Checks breakProgram,(schedule|cancel)PauseOnNextStatement test API"); |
-InspectorTest.addScript(` |
+contextGroup.addScript(` |
function callBreakProgram() { |
inspector.breakProgram('reason', JSON.stringify({a: 42})); |
} |
@@ -13,10 +13,10 @@ function foo() { |
return 42; |
}`, 7, 26); |
-InspectorTest.setupScriptMap(); |
+session.setupScriptMap(); |
Protocol.Debugger.onPaused(message => { |
InspectorTest.log('Stack:'); |
- InspectorTest.logCallFrames(message.params.callFrames); |
+ session.logCallFrames(message.params.callFrames); |
delete message.params.callFrames; |
InspectorTest.log('Other data:'); |
InspectorTest.logMessage(message); |
@@ -33,17 +33,17 @@ InspectorTest.runTestSuite([ |
}, |
function testSchedulePauseOnNextStatement(next) { |
- InspectorTest.contextGroup.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42})); |
+ contextGroup.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42})); |
Protocol.Runtime.evaluate({ expression: 'foo()//# sourceURL=expr1.js'}) |
.then(() => Protocol.Runtime.evaluate({ |
expression: 'foo()//# sourceURL=expr2.js'})) |
- .then(() => InspectorTest.contextGroup.cancelPauseOnNextStatement()) |
+ .then(() => contextGroup.cancelPauseOnNextStatement()) |
.then(next); |
}, |
function testCancelPauseOnNextStatement(next) { |
- InspectorTest.contextGroup.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42})); |
- InspectorTest.contextGroup.cancelPauseOnNextStatement(); |
+ contextGroup.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42})); |
+ contextGroup.cancelPauseOnNextStatement(); |
Protocol.Runtime.evaluate({ expression: 'foo()'}) |
.then(next); |
} |