Bug 1440577 - Marionette has to use "eForceQuit" for in_app shutdown and restart requests draft
authorAlvaroRe <arb952@gmail.com>
Tue, 10 Apr 2018 18:11:08 +0200
changeset 786550 20873ad666044a8f60d4b63fb1a5208f71569e9c
parent 759182 ad3c6f89d67752309a473e57a47fb88f9da37683
push id107507
push userbmo:arb952@gmail.com
push dateMon, 23 Apr 2018 14:52:01 +0000
bugs1440577
milestone60.0a1
Bug 1440577 - Marionette has to use "eForceQuit" for in_app shutdown and restart requests MozReview-Commit-ID: KEwEg7AK7yu
testing/marionette/client/marionette_driver/marionette.py
--- 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"]