Closed Bug 1148220 Opened 9 years ago Closed 8 years ago

Marionette's in_app restart has to send 'quit-application-requested' observer notification before an in_app restart

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox52 fixed)

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: galgeek, Assigned: whimboo)

References

Details

(Keywords: pi-marionette-server)

Attachments

(1 file)

Firefox UI Tests' restart() method currently fails to store open tabs properly unless preceded by additional code like this:

        self.marionette.execute_script("""
          Components.utils.import("resource://gre/modules/Services.jsm");
          let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]
                                     .createInstance(Components.interfaces.nsISupportsPRBool);
          Services.obs.notifyObservers(cancelQuit, "quit-application-requested", null);
        """)

It would be good to add this to the restart() method, perhaps via a parameter, since this won't matter to many tests.

Chris Manchester first reported this here: https://bugzilla.mozilla.org/show_bug.cgi?id=1132701#c4
That's what I told Chris when he was working on the in_app restart functionality of Marionette. See bug 1137388 comment 11. He told that this is not necessary. But it looks like it is. So this is a Marionette bug and nothing we have to do in our tests.
Component: Firefox UI Tests → Marionette
Depends on: 1137388
Product: Mozilla QA → Testing
QA Contact: hskupin
Summary: Add ability to store open tabs to restart() method → Marionette's in_app restart has to send 'quit-application-requested' observer notification before an in_app restart
(In reply to Henrik Skupin (:whimboo) [away 03/25 - 03/31] from comment #1)
> That's what I told Chris when he was working on the in_app restart
> functionality of Marionette. See bug 1137388 comment 11. He told that this
> is not necessary. But it looks like it is. So this is a Marionette bug and
> nothing we have to do in our tests.

Clearly the significance of that comment was lost. Fortunately we figured out the issue as soon as it came up and this code can easily be added in marionette or anywhere it's needed.
Blocks: 1141335
Blocks: 1258982
Comment on attachment 8794806 [details]
Bug 1148220 - Marionette's in_app restart has to send 'quit-application-requested' observer notification.

https://reviewboard.mozilla.org/r/81100/#review80254
Attachment #8794806 - Flags: review?(dburns) → review+
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b99e97b8f228
Marionette's in_app restart has to send 'quit-application-requested' observer notification. r=automatedtester
https://hg.mozilla.org/mozilla-central/rev/b99e97b8f228
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: