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

Unified Diff: test/inspector/debugger/step-over-caught-exception.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/step-over-caught-exception.js
diff --git a/test/inspector/debugger/step-over-caught-exception.js b/test/inspector/debugger/step-over-caught-exception.js
index dd4fa5f5563411647675e358aece0b61ac253b1b..e00dcf27dc9d877e76b1d5d425659a75a1411836 100644
--- a/test/inspector/debugger/step-over-caught-exception.js
+++ b/test/inspector/debugger/step-over-caught-exception.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()
{
function foo()
@@ -17,15 +17,15 @@ InspectorTest.evaluateInPage(
console.log("completed");
}`);
-InspectorTest.sendCommandOrDie("Debugger.enable", {});
-InspectorTest.sendCommandOrDie("Runtime.enable", {});
+Protocol.Debugger.enable();
+Protocol.Runtime.enable();
step1();
function step1()
{
- InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "setTimeout(testFunction, 0);"});
+ Protocol.Runtime.evaluate({ "expression": "setTimeout(testFunction, 0);"});
var commands = [ "Print", "stepOver", "stepOver", "Print", "resume" ];
- InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ Protocol.Debugger.onPaused(function(messageObject)
{
var command = commands.shift();
if (command === "Print") {
@@ -35,24 +35,24 @@ function step1()
command = commands.shift();
}
if (command)
- InspectorTest.sendCommandOrDie("Debugger." + command, {});
- }
+ Protocol.Debugger[command]();
+ });
- InspectorTest.eventHandler["Runtime.consoleAPICalled"] = function(messageObject)
+ Protocol.Runtime.onConsoleAPICalled(function(messageObject)
{
if (messageObject.params.args[0].value === "completed") {
if (commands.length)
InspectorTest.log("[FAIL]: execution was resumed too earlier.")
step2();
}
- }
+ });
}
function step2()
{
- InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "setTimeout(testFunction, 0);"});
+ Protocol.Runtime.evaluate({ "expression": "setTimeout(testFunction, 0);"});
var commands = [ "Print", "stepOver", "stepInto", "stepOver", "stepOver", "Print", "resume" ];
- InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
+ Protocol.Debugger.onPaused(function(messageObject)
{
var command = commands.shift();
if (command === "Print") {
@@ -62,15 +62,15 @@ function step2()
command = commands.shift();
}
if (command)
- InspectorTest.sendCommandOrDie("Debugger." + command, {});
- }
+ Protocol.Debugger[command]();
+ });
- InspectorTest.eventHandler["Runtime.consoleAPICalled"] = function(messageObject)
+ Protocol.Runtime.onConsoleAPICalled(function(messageObject)
{
if (messageObject.params.args[0].value === "completed") {
if (commands.length)
InspectorTest.log("[FAIL]: execution was resumed too earlier.")
InspectorTest.completeTest();
}
- }
+ });
}
« no previous file with comments | « test/inspector/debugger/set-script-source.js ('k') | test/inspector/debugger/stepping-with-blackboxed-ranges.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698