Index: LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html |
diff --git a/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html b/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html |
index 0095abc8c3be67c6d571c7c20c648fa2f18ada80..aabbca621b5425b217b98aee739b93964e994533 100644 |
--- a/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html |
+++ b/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html |
@@ -31,8 +31,14 @@ InspectorFrontendAPI = {}; |
InspectorTest = {}; |
InspectorTest._dispatchTable = []; |
InspectorTest._requestId = -1; |
+InspectorTest._dumpInspectorProtocolMessages = false; |
InspectorTest.eventHandler = {}; |
+InspectorTest.startDumpingProtocolMessages = function() |
+{ |
+ InspectorTest._dumpInspectorProtocolMessages = true; |
+} |
+ |
/** |
* @param {string} method |
* @param {object} params |
@@ -46,6 +52,8 @@ InspectorTest.sendCommand = function(method, params, handler) |
"params": params, |
"id": this._requestId }; |
+ if (InspectorTest._dumpInspectorProtocolMessages) |
+ testRunner.logToStderr("backend: " + JSON.stringify(messageObject)); |
InspectorFrontendHost.sendMessageToBackend(JSON.stringify(messageObject)); |
return this._requestId; |
@@ -132,6 +140,8 @@ InspectorTest.sendRawCommand = function(command, handler) |
*/ |
InspectorFrontendAPI.dispatchMessage = function(message) |
{ |
+ if (InspectorTest._dumpInspectorProtocolMessages) |
+ testRunner.logToStderr("frontend: " + message); |
var messageObject = JSON.parse(message); |
var messageId = messageObject["id"]; |
try { |