Index: LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js |
diff --git a/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js b/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js |
index 24d460e403ba003799ffa6782f1daccedf98c31b..b1543196a6321a0472e94c1a547af27b6bba389f 100644 |
--- a/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js |
+++ b/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js |
@@ -51,6 +51,21 @@ InspectorTest.sendCommand = function(method, params, handler) |
return this._requestId; |
} |
+InspectorTest.sendCommandOrDie = function(command, properties, callback) |
+{ |
+ InspectorTest.sendCommand(command, properties || {}, commandCallback); |
+ function commandCallback(msg) |
+ { |
+ if (msg.error) { |
+ InspectorTest.log("ERROR: " + msg.error.message); |
+ InspectorTest.completeTest(); |
+ return; |
+ } |
+ if (callback) |
+ callback(msg.result); |
+ } |
+} |
+ |
/** |
* @param {function(object)=} callback |
*/ |