Bug 1337743 - Rename quitApplication command quit; r=whimboo

This shortens the name of the quitApplication Marionette command to
`quit'.

The client is not updated since it is used for Firefox upgrade tests.
It can be updated to use `quit' when Firefox 56 ships.

MozReview-Commit-ID: Gq5KWMS1AzF

--HG--
extra : rebase_source : dfaf557f658595bfa5b8d1d294d6d6525f5d2abf
This commit is contained in:
Andreas Tolfsen 2017-03-27 12:53:27 +01:00
parent 9bfbf4c96b
commit d594cb5ef8
3 changed files with 9 additions and 5 deletions

View File

@ -1147,7 +1147,7 @@ class Marionette(object):
"""
# The vast majority of this function was implemented inside
# the quitApplication command as part of bug 1337743, and can be
# the quit command as part of bug 1337743, and can be
# removed from here in Firefox 55 at the earliest.
# remove duplicates
@ -1175,6 +1175,9 @@ class Marionette(object):
body = None
if len(flags) > 0:
body = {"flags": list(flags)}
# quitApplication was renamed quit in bug 1337743,
# and this can safely be renamed when Firefox 56 becomes stable
self._send_message("quitApplication", body)
@do_process_check

View File

@ -2737,7 +2737,7 @@ GeckoDriver.prototype.acceptConnections = function (cmd, resp) {
* If |flags| contains unknown or incompatible flags, for example
* multiple Quit flags.
*/
GeckoDriver.prototype.quitApplication = function* (cmd, resp) {
GeckoDriver.prototype.quit = function* (cmd, resp) {
const quits = ["eConsiderQuit", "eAttemptQuit", "eForceQuit"];
let flags = [];
@ -3055,7 +3055,8 @@ GeckoDriver.prototype.commands = {
"getTextFromDialog": GeckoDriver.prototype.getTextFromDialog,
"sendKeysToDialog": GeckoDriver.prototype.sendKeysToDialog,
"acceptConnections": GeckoDriver.prototype.acceptConnections,
"quitApplication": GeckoDriver.prototype.quitApplication,
"quitApplication": GeckoDriver.prototype.quit, // deprecated, can be removed in Firefox 56
"quit": GeckoDriver.prototype.quit,
"localization:l10n:localizeEntity": GeckoDriver.prototype.localizeEntity,
"localization:l10n:localizeProperty": GeckoDriver.prototype.localizeProperty,

View File

@ -19,7 +19,7 @@ class TestServerQuitApplication(MarionetteTestCase):
body = {"flags": list(flags)}
try:
resp = self.marionette._send_message("quitApplication", body)
resp = self.marionette._send_message("quit", body)
finally:
self.marionette.session_id = None
self.marionette.session = None
@ -38,7 +38,7 @@ class TestServerQuitApplication(MarionetteTestCase):
for typ in [42, True, "foo", []]:
print("testing type {}".format(type(typ)))
with self.assertRaises(errors.InvalidArgumentException):
self.marionette._send_message("quitApplication", typ)
self.marionette._send_message("quit", typ)
with self.assertRaises(errors.InvalidArgumentException):
self.quit("foo")