Open Bug 1934182 Opened 5 days ago Updated 9 hours ago

Disable the "Open previous tabs? You can restore your previous session from the %app% application menu" notification

Categories

(Testing :: General, task)

task

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: whimboo, Assigned: sfoster, NeedInfo)

Details

Attachments

(1 file)

I have seen on a screenshot as generated in CI that the Open previous tabs? You can restore your previous session from the %app% application menu notification bar is displayed at the top of the tab. This is stealing extra space and could potentially cause tests to fail. We should disable it by default.

Checking via searchfox I found that it restore-session-startup-suggestion-message which holds this message and is used in _maybeShowRestoreSessionInfoBar() of BrowerGlue.sys.mjs.

Sadly the decision if the notification bar is shown or not is only bound to the value of browser.startup.couldRestoreSession.count and I do not see a way to disable this notification by a separate preference all together.

Sam, maybe I miss something but given that you wrote that code could you please help us? Thanks.

Flags: needinfo?(sfoster)

I don't see any test coverage for this notification at first glance. Maybe we should just skip incrementing that counter when Cu.isInAutomation is true? That would still permit us to set the pref explicitly to test the feature, while not exposing all the other tests to this variability. Patch incoming.

Flags: needinfo?(sfoster)
Assignee: nobody → sfoster
Status: NEW → ASSIGNED

(In reply to Sam Foster [:sfoster] (he/him) from comment #1)

I don't see any test coverage for this notification at first glance. Maybe we should just skip incrementing that counter when Cu.isInAutomation is true? That would still permit us to set the pref explicitly to test the feature, while not exposing all the other tests to this variability. Patch incoming.

This is not going to work for Remote Protocol (Marionette and WebDriver BiDi) because it is independent from Cu.isInAutomation. We would really need a specific way to disable this notification. Tests who actually want to to test it can always enable the preference again.

Flags: needinfo?(sfoster)

I'm happy to flip the default in the testing profile, but I'm not sure what kind of try push would verify the change? Are you able to try this out :whimboo?

Flags: needinfo?(sfoster) → needinfo?(hskupin)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: