Bug 1430119 - Fix API documentation in testing/marionette/server.js. r?maja_zf draft
authorAndreas Tolfsen <ato@sny.no>
Fri, 12 Jan 2018 14:41:35 +0000
changeset 719650 e284ca4f08d7d09ed34f0cf0e226c644ddd077e1
parent 719593 d2edd256c3aadb1cea48da0c8f62f725bd53cb76
child 745853 7c8f4b5c6aa691f56ccf69e0acdedae8aa50efb9
push id95316
push userbmo:ato@sny.no
push dateFri, 12 Jan 2018 14:42:22 +0000
reviewersmaja_zf
bugs1430119
milestone59.0a1
Bug 1430119 - Fix API documentation in testing/marionette/server.js. r?maja_zf MozReview-Commit-ID: KEPTCkrdqOr
testing/marionette/server.js
--- a/testing/marionette/server.js
+++ b/testing/marionette/server.js
@@ -48,17 +48,17 @@ const ENV_ENABLED = "MOZ_MARIONETTE";
 
 const PREF_CONTENT_LISTENER = "marionette.contentListener";
 const PREF_PORT = "marionette.port";
 const PREF_RECOMMENDED = "marionette.prefs.recommended";
 
 const NOTIFY_RUNNING = "remote-active";
 
 // Marionette sets preferences recommended for automation when it starts,
-// unless |marionette.prefs.recommended| has been set to false.
+// unless marionette.prefs.recommended has been set to false.
 // Where noted, some prefs should also be set in the profile passed to
 // Marionette to prevent them from affecting startup, since some of these
 // are checked before Marionette initialises.
 const RECOMMENDED_PREFS = new Map([
 
   // Disable automatic downloading of new releases.
   //
   // This should also be set in the profile prior to starting Firefox,
@@ -286,18 +286,18 @@ const RECOMMENDED_PREFS = new Map([
   ["toolkit.startup.max_resumed_crashes", -1],
 
 ]);
 
 /**
  * Bootstraps Marionette and handles incoming client connections.
  *
  * Starting the Marionette server will open a TCP socket sporting the
- * debugger transport interface on the provided |port|.  For every new
- * connection, a |server.TCPConnection| is created.
+ * debugger transport interface on the provided <var>port</var>.
+ * For every new connection, a {@link server.TCPConnection} is created.
  */
 server.TCPListener = class {
   /**
    * @param {number} port
    *     Port for server to listen to.
    */
   constructor(port) {
     this.port = port;
@@ -336,21 +336,21 @@ server.TCPListener = class {
     } else if (this.socket) {
       this.socket.close();
       this.socket = null;
       logger.debug("New connections will no longer be accepted");
     }
   }
 
   /**
-   * Bind this listener to |port| and start accepting incoming socket
-   * connections on |onSocketAccepted|.
+   * Bind this listener to {@link #port} and start accepting incoming
+   * socket connections on {@link #onSocketAccepted}.
    *
    * The marionette.port preference will be populated with the value
-   * of |this.port|.
+   * of {@link #port}.
    */
   start() {
     if (this.alive) {
       return;
     }
 
     Services.obs.notifyObservers(this, NOTIFY_RUNNING, true);
 
@@ -420,17 +420,17 @@ server.TCPListener = class {
  * Dispatches packets received to their correct service destinations
  * and sends back the service endpoint's return values.
  *
  * @param {number} connID
  *     Unique identifier of the connection this dispatcher should handle.
  * @param {DebuggerTransport} transport
  *     Debugger transport connection to the client.
  * @param {function(): GeckoDriver} driverFactory
- *     Factory function that produces a |GeckoDriver|.
+ *     Factory function that produces a {@link GeckoDriver}.
  */
 server.TCPConnection = class {
   constructor(connID, transport, driverFactory) {
     this.id = connID;
     this.conn = transport;
 
     // transport hooks are TCPConnection#onPacket
     // and TCPConnection#onClosed
@@ -561,23 +561,23 @@ server.TCPConnection = class {
         resp.body = {value: rv};
       } else {
         resp.body = rv;
       }
     }
   }
 
   /**
-   * Fail-safe creation of a new instance of |message.Response|.
+   * Fail-safe creation of a new instance of {@link Response}.
    *
    * @param {number} msgID
    *     Message ID to respond to.  If it is not a number, -1 is used.
    *
-   * @return {message.Response}
-   *     Response to the message with |msgID|.
+   * @return {Response}
+   *     Response to the message with <var>msgID</var>.
    */
   createResponse(msgID) {
     if (typeof msgID != "number") {
       msgID = -1;
     }
     return new Response(msgID, this.send.bind(this));
   }