Bug 1419538 - Marionette log entries should show object details. r=ato, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Thu, 30 Nov 2017 15:09:32 +0100
changeset 445110 89e5df69214e2970045b29bc16e6611642f2f3ee
parent 445109 699b253725efc849c4587b8c961f65f3e97d0bce
child 445111 5458d3423176c3d1891a2ea48b48bbd039a9e2cc
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
bugs1419538
milestone58.0
Bug 1419538 - Marionette log entries should show object details. r=ato, a=test-only By missing to convert a Javascript object to a packet and serializing it, no details were printed eg for session capabilities for the call to "start_session()". MozReview-Commit-ID: HdcehGpBvdA
testing/marionette/message.js
--- a/testing/marionette/message.js
+++ b/testing/marionette/message.js
@@ -22,17 +22,18 @@ class Message {
    * @param {number} messageID
    *     Message ID unique identifying this message.
    */
   constructor(messageID) {
     this.id = assert.integer(messageID);
   }
 
   toString() {
-    return truncate`${this.toPacket()}`;
+    let content = JSON.stringify(this.toPacket());
+    return truncate`${content}`;
   }
 
   /**
    * Converts a data packet into a {@link Command} or {@link Response}.
    *
    * @param {Array.<number, number, ?, ?>} data
    *     A four element array where the elements, in sequence, signifies
    *     message type, message ID, method name or error, and parameters