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

Unified Diff: test/inspector/debugger/access-obsolete-frame.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
Index: test/inspector/debugger/access-obsolete-frame.js
diff --git a/test/inspector/debugger/access-obsolete-frame.js b/test/inspector/debugger/access-obsolete-frame.js
index 27f9976ed743bb117132e4f15b71fe45a0e2baa8..b5a96e1c3cae537abb77db2d09ef5bc7501a61f8 100644
--- a/test/inspector/debugger/access-obsolete-frame.js
+++ b/test/inspector/debugger/access-obsolete-frame.js
@@ -2,18 +2,18 @@
// 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()
{
debugger;
}
//# sourceURL=foo.js`);
-InspectorTest.sendCommand("Debugger.enable", {});
+Protocol.Debugger.enable();
-InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPausedOne;
+Protocol.Debugger.oncePaused().then(handleDebuggerPausedOne);
-InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeout(testFunction, 0)" });
+Protocol.Runtime.evaluate({ "expression": "setTimeout(testFunction, 0)" });
var obsoleteTopFrameId;
@@ -24,30 +24,28 @@ function handleDebuggerPausedOne(messageObject)
var topFrame = messageObject.params.callFrames[0];
obsoleteTopFrameId = topFrame.callFrameId;
- InspectorTest.eventHandler["Debugger.paused"] = undefined;
-
- InspectorTest.sendCommand("Debugger.resume", { }, callbackResume);
+ Protocol.Debugger.resume().then(callbackResume);
}
function callbackResume(response)
{
InspectorTest.log("resume");
InspectorTest.log("restartFrame");
- InspectorTest.sendCommand("Debugger.restartFrame", { callFrameId: obsoleteTopFrameId }, callbackRestartFrame);
+ Protocol.Debugger.restartFrame({ callFrameId: obsoleteTopFrameId }).then(callbackRestartFrame);
}
function callbackRestartFrame(response)
{
logErrorResponse(response);
InspectorTest.log("evaluateOnFrame");
- InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", { callFrameId: obsoleteTopFrameId, expression: "0"} , callbackEvaluate);
+ Protocol.Debugger.evaluateOnCallFrame({ callFrameId: obsoleteTopFrameId, expression: "0"}).then(callbackEvaluate);
}
function callbackEvaluate(response)
{
logErrorResponse(response);
InspectorTest.log("setVariableValue");
- InspectorTest.sendCommand("Debugger.setVariableValue", { callFrameId: obsoleteTopFrameId, scopeNumber: 0, variableName: "a", newValue: { value: 0 } }, callbackSetVariableValue);
+ Protocol.Debugger.setVariableValue({ callFrameId: obsoleteTopFrameId, scopeNumber: 0, variableName: "a", newValue: { value: 0 } }).then(callbackSetVariableValue);
}
function callbackSetVariableValue(response)

Powered by Google App Engine
This is Rietveld 408576698