Bug 1440577 - Marionette has to use "eForceQuit" for in_app shutdown and restart requests
MozReview-Commit-ID: KEwEg7AK7yu
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -1006,43 +1006,43 @@ class Marionette(object):
# Restore the context as used before the restart
self.set_context(context)
def _request_in_app_shutdown(self, *shutdown_flags):
"""Attempt to quit the currently running instance from inside the
application.
Duplicate entries in `shutdown_flags` are removed, and
- `"eAttemptQuit"` is added if no other `*Quit` flags are given.
+ `"eForceQuit"` is added if no other `*Quit` flags are given.
This provides backwards compatible behaviour with earlier
Firefoxen.
This method effectively calls `Services.startup.quit` in Gecko.
Possible flag values are listed at http://mzl.la/1X0JZsC.
:param shutdown_flags: Optional additional quit masks to include.
- Duplicates are removed, and `"eAttemptQuit"` is added if no
+ Duplicates are removed, and `"eForceQuit"` is added if no
flags ending with `"Quit"` are present.
:throws InvalidArgumentException: If there are multiple
`shutdown_flags` ending with `"Quit"`.
:returns: The cause of shutdown.
"""
# The vast majority of this function was implemented inside
# the quit command as part of bug 1337743, and can be
# removed from here in Firefox 55 at the earliest.
# remove duplicates
flags = set(shutdown_flags)
- # add eAttemptQuit if there are no *Quits
+ # add eForceQuit if there are no *Quits
if not any(flag.endswith("Quit") for flag in flags):
- flags = flags | set(("eAttemptQuit",))
+ flags = flags | set(("eForceQuit",))
# Trigger a quit-application-requested observer notification
# so that components can safely shutdown before quitting the
# application.
with self.using_context("chrome"):
canceled = self.execute_script("""
Components.utils.import("resource://gre/modules/Services.jsm");
let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]