--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -134,17 +134,17 @@ this.GeckoDriver = function (appName, se
this.legacyactions = new legacyaction.Chain();
this.timer = null;
this.inactivityTimer = null;
this.marionetteLog = new logging.ContentLogger();
this.testName = null;
- this.sessionCapabilities = new session.Capabilities();
+ this.capabilities = new session.Capabilities();
this.mm = globalMessageManager;
this.listener = proxy.toListener(() => this.mm, this.sendAsync.bind(this));
// always keep weak reference to current dialogue
this.dialog = null;
let handleDialog = (subject, topic) => {
let winr;
@@ -153,17 +153,17 @@ this.GeckoDriver = function (appName, se
}
this.dialog = new modal.Dialog(() => this.curBrowser, winr);
};
modal.addHandler(handleDialog);
};
Object.defineProperty(GeckoDriver.prototype, "a11yChecks", {
get: function () {
- return this.sessionCapabilities.get("moz:accessibilityChecks");
+ return this.capabilities.get("moz:accessibilityChecks");
}
});
GeckoDriver.prototype.QueryInterface = XPCOMUtils.generateQI([
Ci.nsIMessageListener,
Ci.nsIObserver,
Ci.nsISupportsWeakReference,
]);
@@ -440,24 +440,24 @@ GeckoDriver.prototype.registerBrowser =
if (mainContent) {
this.mainContentFrameId = this.curBrowser.curFrameId;
}
this.wins.set(reg.id, listenerWindow);
if (nullPrevious && (this.curBrowser.curFrameId !== null)) {
this.sendAsync(
"newSession",
- this.sessionCapabilities.toJSON(),
+ this.capabilities.toJSON(),
this.newSessionCommandId);
if (this.curBrowser.isNewSession) {
this.newSessionCommandId = null;
}
}
- return [reg, mainContent, this.sessionCapabilities.toJSON()];
+ return [reg, mainContent, this.capabilities.toJSON()];
};
GeckoDriver.prototype.registerPromise = function() {
const li = "Marionette:register";
return new Promise(resolve => {
let cb = msg => {
let wid = msg.json.value;
@@ -488,52 +488,52 @@ GeckoDriver.prototype.listeningPromise =
resolve();
};
this.mm.addMessageListener(li, cb);
});
};
Object.defineProperty(GeckoDriver.prototype, "timeouts", {
get: function () {
- return this.sessionCapabilities.get("timeouts");
+ return this.capabilities.get("timeouts");
},
set: function (newTimeouts) {
- this.sessionCapabilities.set("timeouts", newTimeouts);
+ this.capabilities.set("timeouts", newTimeouts);
},
});
Object.defineProperty(GeckoDriver.prototype, "secureTLS", {
get: function () {
- return !this.sessionCapabilities.get("acceptInsecureCerts");
+ return !this.capabilities.get("acceptInsecureCerts");
}
});
Object.defineProperty(GeckoDriver.prototype, "proxy", {
get: function () {
- return this.sessionCapabilities.get("proxy");
+ return this.capabilities.get("proxy");
}
});
/** Create a new session. */
GeckoDriver.prototype.newSession = function*(cmd, resp) {
if (this.sessionId) {
throw new SessionNotCreatedError("Maximum number of active sessions");
}
this.sessionId = cmd.parameters.sessionId ||
cmd.parameters.session_id ||
element.generateUUID();
this.newSessionCommandId = cmd.id;
try {
- this.sessionCapabilities = session.Capabilities.fromJSON(
+ this.capabilities = session.Capabilities.fromJSON(
cmd.parameters.capabilities, {merge: true});
logger.config("Matched capabilities: " +
- JSON.stringify(this.sessionCapabilities));
+ JSON.stringify(this.capabilities));
} catch (e) {
throw new SessionNotCreatedError(e);
}
if (!this.secureTLS) {
logger.warn("TLS certificate errors will be ignored for this session");
let acceptAllCerts = new cert.InsecureSweepingOverride();
cert.installOverride(acceptAllCerts);
@@ -609,33 +609,33 @@ GeckoDriver.prototype.newSession = funct
yield registerBrowsers;
yield browserListening;
this.curBrowser.browserForTab.focus();
return {
sessionId: this.sessionId,
- capabilities: this.sessionCapabilities,
+ capabilities: this.capabilities,
};
};
/**
* Send the current session's capabilities to the client.
*
* Capabilities informs the client of which WebDriver features are
* supported by Firefox and Marionette. They are immutable for the
* length of the session.
*
* The return value is an immutable map of string keys
* ("capabilities") to values, which may be of types boolean,
* numerical or string.
*/
GeckoDriver.prototype.getSessionCapabilities = function (cmd, resp) {
- resp.body.capabilities = this.sessionCapabilities;
+ resp.body.capabilities = this.capabilities;
};
/**
* Log message. Accepts user defined log-level.
*
* @param {string} value
* Log message.
* @param {string} level
@@ -2227,17 +2227,17 @@ GeckoDriver.prototype.sessionTearDown =
}
this.observing = null;
}
this.sandboxes.clear();
cert.uninstallOverride();
this.sessionId = null;
- this.sessionCapabilities = new session.Capabilities();
+ this.capabilities = new session.Capabilities();
};
/**
* Processes the "deleteSession" request from the client by tearing down
* the session and responding "ok".
*/
GeckoDriver.prototype.deleteSession = function (cmd, resp) {
this.sessionTearDown();
@@ -2675,17 +2675,17 @@ GeckoDriver.prototype.receiveMessage = f
let rv = this.registerBrowser(wid, be);
return rv;
case "Marionette:listenersAttached":
if (message.json.listenerId === this.curBrowser.curFrameId) {
// If remoteness gets updated we need to call newSession. In the case
// of desktop this just sets up a small amount of state that doesn't
// change over the course of a session.
- this.sendAsync("newSession", this.sessionCapabilities);
+ this.sendAsync("newSession", this.capabilities);
this.curBrowser.flushPendingCommands();
}
break;
}
};
GeckoDriver.prototype.responseCompleted = function () {
if (this.curBrowser !== null) {