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

Unified Diff: LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html

Issue 340803002: DevTools: fix for test inspector-protocol/page/enable-disable.html (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed Created 6 years, 6 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/inspector-protocol/page/enable-disable.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/inspector-protocol/page/enable-disable.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698