Bug 1430119 - Fix API documentation in testing/marionette/server.js. r?maja_zf
MozReview-Commit-ID: KEPTCkrdqOr
--- 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));
}