author | Andreas Tolfsen <ato@mozilla.com> |
Thu, 02 Feb 2017 16:11:08 +0000 | |
changeset 341027 | ca0345ae33a42ffc2ec9f776c1a2fe1280d615e7 |
parent 341026 | c93a410adde07a4393778b1cbec7257bed7ef39e |
child 341028 | 6d17a85df7e32778362ba54466d1a4a224f645b8 |
push id | 86615 |
push user | kwierso@gmail.com |
push date | Tue, 07 Feb 2017 01:52:08 +0000 |
treeherder | mozilla-inbound@f0453084d86e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | maja_zf |
bugs | 1336124 |
milestone | 54.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
testing/marionette/dispatcher.js | file | annotate | diff | comparison | revisions | |
testing/marionette/driver.js | file | annotate | diff | comparison | revisions |
--- a/testing/marionette/dispatcher.js +++ b/testing/marionette/dispatcher.js @@ -51,17 +51,17 @@ this.Dispatcher = function (connId, tran this.commands_ = new Map(); }; /** * Debugger transport callback that cleans up * after a connection is closed. */ Dispatcher.prototype.onClosed = function (reason) { - this.driver.sessionTearDown(); + this.driver.deleteSession(); if (this.onclose) { this.onclose(this); } }; /** * Callback that receives data packets from the client. *
--- a/testing/marionette/driver.js +++ b/testing/marionette/driver.js @@ -2181,27 +2181,18 @@ GeckoDriver.prototype.closeChromeWindow if (this.mm != globalMessageManager) { this.mm.removeDelayedFrameScript(FRAME_SCRIPT); } return this.curBrowser.closeWindow().then(() => this.chromeWindowHandles); }; -/** - * Deletes the session. - * - * If it is a desktop environment, it will close all listeners. - * - * If it is a B2G environment, it will make the main content listener - * sleep, and close all other listeners. The main content listener - * persists after disconnect (it's the homescreen), and can safely - * be reused. - */ -GeckoDriver.prototype.sessionTearDown = function (cmd, resp) { +/** Delete Marionette session. */ +GeckoDriver.prototype.deleteSession = function (cmd, resp) { if (this.curBrowser !== null) { // frame scripts can be safely reused Preferences.set(CONTENT_LISTENER_PREF, false); // delete session in each frame in each browser for (let win in this.browsers) { let browser = this.browsers[win]; for (let i in browser.knownFrames) { @@ -2246,24 +2237,16 @@ GeckoDriver.prototype.sessionTearDown = this.sandboxes.clear(); cert.uninstallOverride(); this.sessionId = null; 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(); -}; - /** Returns the current status of the Application Cache. */ GeckoDriver.prototype.getAppCacheStatus = function* (cmd, resp) { switch (this.context) { case Context.CHROME: throw new UnsupportedOperationError( "Command 'getAppCacheStatus' is not yet available in chrome context"); case Context.CONTENT: @@ -2571,17 +2554,17 @@ GeckoDriver.prototype.quitApplication = let flags = Ci.nsIAppStartup.eAttemptQuit; for (let k of cmd.parameters.flags || []) { flags |= Ci.nsIAppStartup[k]; } this._server.acceptConnections = false; resp.send(); - this.sessionTearDown(); + this.deleteSession(); Services.startup.quit(flags); }; GeckoDriver.prototype.installAddon = function (cmd, resp) { assert.firefox() let path = cmd.parameters.path; let temp = cmd.parameters.temporary || false;