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

Unified Diff: test/inspector/debugger/scope-skip-variables-with-empty-name.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/scope-skip-variables-with-empty-name.js
diff --git a/test/inspector/debugger/scope-skip-variables-with-empty-name.js b/test/inspector/debugger/scope-skip-variables-with-empty-name.js
index e29bf4b2315054a11be6df1c921976761dd34fa8..e2b38d8ec9ac6fde781983aaa568f8c753bd8e2f 100644
--- a/test/inspector/debugger/scope-skip-variables-with-empty-name.js
+++ b/test/inspector/debugger/scope-skip-variables-with-empty-name.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()
{
for (var a of [1]) {
@@ -11,9 +11,9 @@ InspectorTest.evaluateInPage(
}
}`);
-InspectorTest.sendCommandOrDie("Debugger.enable", {});
-InspectorTest.eventHandler["Debugger.paused"] = dumpScopeOnPause;
-InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "testFunction()" });
+Protocol.Debugger.enable();
+Protocol.Debugger.oncePaused().then(dumpScopeOnPause);
+Protocol.Runtime.evaluate({ "expression": "testFunction()" });
var waitScopeObjects = 0;
function dumpScopeOnPause(message)
@@ -29,14 +29,14 @@ function dumpScopeOnPause(message)
InspectorTest.completeTest();
} else {
for (var objectId of localScopeObjectIds)
- InspectorTest.sendCommandOrDie("Runtime.getProperties", { "objectId" : objectId }, dumpProperties);
+ Protocol.Runtime.getProperties({ "objectId" : objectId }).then(dumpProperties);
}
}
function dumpProperties(message)
{
- InspectorTest.logObject(message);
+ InspectorTest.logMessage(message);
--waitScopeObjects;
if (!waitScopeObjects)
- InspectorTest.sendCommandOrDie("Debugger.resume", {}, () => InspectorTest.completeTest());
+ Protocol.Debugger.resume().then(InspectorTest.completeTest);
}

Powered by Google App Engine
This is Rietveld 408576698