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

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: race was removed 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
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..6dd2b39ecf5fee45d4b6f8c0aa840d3f57963fce 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(JSON.stringify(messageObject, ""));
InspectorFrontendHost.sendMessageToBackend(JSON.stringify(messageObject));
return this._requestId;
@@ -133,6 +141,8 @@ InspectorTest.sendRawCommand = function(command, handler)
InspectorFrontendAPI.dispatchMessage = function(message)
{
var messageObject = JSON.parse(message);
+ if (InspectorTest._dumpInspectorProtocolMessages)
+ testRunner.logToStderr(JSON.stringify(messageObject, ""));
var messageId = messageObject["id"];
try {
if (typeof messageId === "number") {

Powered by Google App Engine
This is Rietveld 408576698