Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: test/inspector/debugger/update-call-frame-scopes.js

Issue 2390733002: [inspector] Make InspectorTest.sendCommand* private (Closed)
Patch Set: addressed comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/inspector/debugger/stepping-with-blackboxed-ranges.js ('k') | test/inspector/inspector-test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/debugger/update-call-frame-scopes.js
diff --git a/test/inspector/debugger/update-call-frame-scopes.js b/test/inspector/debugger/update-call-frame-scopes.js
index 2d1b94502c9d11e2abc98d183ef46e652185488d..f4a0f12397c501668d761303730fab169c09e645 100644
--- a/test/inspector/debugger/update-call-frame-scopes.js
+++ b/test/inspector/debugger/update-call-frame-scopes.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.evaluateInPage(
+InspectorTest.addScript(
`function TestFunction()
{
var a = 2;
@@ -12,34 +12,33 @@ InspectorTest.evaluateInPage(
var newVariableValue = 55;
-InspectorTest.sendCommand("Debugger.enable", {});
+Protocol.Debugger.enable();
-InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPaused;
+Protocol.Debugger.oncePaused().then(handleDebuggerPaused);
-InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeout(TestFunction, 0)" });
+Protocol.Runtime.evaluate({ "expression": "setTimeout(TestFunction, 0)" });
function handleDebuggerPaused(messageObject)
{
InspectorTest.log("Paused on 'debugger;'");
- InspectorTest.eventHandler["Debugger.paused"] = undefined;
var topFrame = messageObject.params.callFrames[0];
var topFrameId = topFrame.callFrameId;
- InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", { "callFrameId": topFrameId, "expression": "a = " + newVariableValue }, callbackChangeValue);
+ Protocol.Debugger.evaluateOnCallFrame({ "callFrameId": topFrameId, "expression": "a = " + newVariableValue }).then(callbackChangeValue);
}
function callbackChangeValue(response)
{
InspectorTest.log("Variable value changed");
- InspectorTest.eventHandler["Debugger.paused"] = callbackGetBacktrace;
- InspectorTest.sendCommand("Debugger.resume", { });
+ Protocol.Debugger.oncePaused().then(callbackGetBacktrace);
+ Protocol.Debugger.resume();
}
function callbackGetBacktrace(response)
{
InspectorTest.log("Stacktrace re-read again");
var localScope = response.params.callFrames[0].scopeChain[0];
- InspectorTest.sendCommand("Runtime.getProperties", { "objectId": localScope.object.objectId }, callbackGetProperties);
+ Protocol.Runtime.getProperties({ "objectId": localScope.object.objectId }).then(callbackGetProperties);
}
function callbackGetProperties(response)
« no previous file with comments | « test/inspector/debugger/stepping-with-blackboxed-ranges.js ('k') | test/inspector/inspector-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698