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

Unified Diff: test/inspector/cpu-profiler/console-profile.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/cpu-profiler/console-profile.js
diff --git a/test/inspector/cpu-profiler/console-profile.js b/test/inspector/cpu-profiler/console-profile.js
index aeba4e395e1937c7f80d8824921be23d930f3509..84873cd169f2b8805662221db4962b605fa7823c 100644
--- a/test/inspector/cpu-profiler/console-profile.js
+++ b/test/inspector/cpu-profiler/console-profile.js
@@ -4,7 +4,7 @@
print("Tests that console.profile/profileEnd will record CPU profile when inspector front-end is connected.");
-InspectorTest.evaluateInPage(`
+InspectorTest.addScript(`
function collectProfiles()
{
console.profile("outer");
@@ -19,17 +19,17 @@ InspectorTest.fail = function(message)
InspectorTest.completeTest();
}
-InspectorTest.sendCommand("Profiler.enable", {});
-InspectorTest.sendCommand("Runtime.evaluate", { expression: "collectProfiles()"}, didCollectProfiles);
+Protocol.Profiler.enable();
+Protocol.Runtime.evaluate({ expression: "collectProfiles()"}).then(didCollectProfiles);
var headers = [];
-InspectorTest.eventHandler["Profiler.consoleProfileFinished"] = function(messageObject)
+Protocol.Profiler.onConsoleProfileFinished(function(messageObject)
{
headers.push({
profile: messageObject["params"]["profile"],
title: messageObject["params"]["title"]
});
-}
+});
function didCollectProfiles(messageObject)
{

Powered by Google App Engine
This is Rietveld 408576698