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

Unified Diff: test/inspector/debugger/set-blackbox-patterns.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/set-blackbox-patterns.js
diff --git a/test/inspector/debugger/set-blackbox-patterns.js b/test/inspector/debugger/set-blackbox-patterns.js
index 792d927a844b374d8108aaecf0d788dc3a90cbc2..12e9e214d3ec50f954322449d1390a263ad6e466 100644
--- a/test/inspector/debugger/set-blackbox-patterns.js
+++ b/test/inspector/debugger/set-blackbox-patterns.js
@@ -2,13 +2,13 @@
// 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 bar()
{
return 42;
}`);
-InspectorTest.evaluateInPage(
+InspectorTest.addScript(
`function foo()
{
var a = bar();
@@ -16,7 +16,7 @@ InspectorTest.evaluateInPage(
}
//# sourceURL=foo.js`);
-InspectorTest.evaluateInPage(
+InspectorTest.addScript(
`function qwe()
{
var a = foo();
@@ -24,7 +24,7 @@ InspectorTest.evaluateInPage(
}
//# sourceURL=qwe.js`);
-InspectorTest.evaluateInPage(
+InspectorTest.addScript(
`function baz()
{
var a = qwe();
@@ -32,15 +32,15 @@ InspectorTest.evaluateInPage(
}
//# sourceURL=baz.js`);
-InspectorTest.sendCommand("Debugger.enable", {});
-InspectorTest.sendCommand("Debugger.setBlackboxPatterns", { patterns: [ "foo([" ] }, dumpError);
+Protocol.Debugger.enable();
+Protocol.Debugger.setBlackboxPatterns({ patterns: [ "foo([" ] }).then(dumpError);
function dumpError(message)
{
InspectorTest.log(message.error.message);
- InspectorTest.eventHandler["Debugger.paused"] = dumpStackAndRunNextCommand;
- InspectorTest.sendCommandOrDie("Debugger.setBlackboxPatterns", { patterns: [ "baz\.js", "foo\.js" ] });
- InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "debugger;baz()" });
+ Protocol.Debugger.onPaused(dumpStackAndRunNextCommand);
+ Protocol.Debugger.setBlackboxPatterns({ patterns: [ "baz\.js", "foo\.js" ] });
+ Protocol.Runtime.evaluate({ "expression": "debugger;baz()" });
}
var commands = [ "stepInto", "stepInto", "stepInto", "stepOut", "stepInto", "stepInto" ];
@@ -55,5 +55,5 @@ function dumpStackAndRunNextCommand(message)
InspectorTest.completeTest();
return;
}
- InspectorTest.sendCommandOrDie("Debugger." + command, {});
+ Protocol.Debugger[command]();
}
« no previous file with comments | « test/inspector/debugger/script-parsed-hash.js ('k') | test/inspector/debugger/set-breakpoint-before-enabling.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698