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

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

Issue 444883004: [DevTools] Make inspector-protocol tests work with messages passed as objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | 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 294ba4036797e18bdcf5571ce04358693addc45f..bfd6a990929a29193ad8f6bb3cd2b9b2f03506ea 100644
--- a/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
+++ b/LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html
@@ -136,13 +136,13 @@ InspectorTest.sendRawCommand = function(command, handler)
}
/**
- * @param {string} message
+ * @param {string|!Object} messageOrObject
*/
-InspectorFrontendAPI.dispatchMessage = function(message)
+InspectorFrontendAPI.dispatchMessage = function(messageOrObject)
{
if (InspectorTest._dumpInspectorProtocolMessages)
- testRunner.logToStderr("backend: " + message);
- var messageObject = JSON.parse(message);
+ testRunner.logToStderr("backend: " + (typeof messageOrObject === "string" ? messageOrObject : JSON.stringify(messageOrObject)));
+ var messageObject = (typeof messageOrObject === "string" ? JSON.parse(messageOrObject) : messageOrObject);
var messageId = messageObject["id"];
try {
if (typeof messageId === "number") {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698