Closed Bug 2026665 Opened 3 months ago Closed 9 days ago

Fix tests/downloads/test_close_browser_with_download_in_progress_shows_prompt.py

Categories

(Mozilla QA :: STArFox, defect, P1)

Desktop
All

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: tracy, Assigned: benchatt)

References

(Blocks 1 open bug)

Details

tests/downloads/test_close_browser_with_download_in_progress_shows_prompt.py is failing on all platforms in Fx150Beta.

Assignee: nobody → twalker
Status: NEW → ASSIGNED

The expected cancel downloads alert is not firing in automation. Haven't been able to determine why. No pref seems to be suppressing it.

Assignee: twalker → nobody
Status: ASSIGNED → NEW
Assignee: nobody → bchatterton
Status: NEW → ASSIGNED

In Mac (and potentially other OSes) closing the last tab no longer exits Firefox, hence no longer firing the alert. Will reach out to team or file a bug.

Ok, instead of closing last tab to exit Fx, actually close Firefox. That should trigger the alert, no?

C1756696 — "close browser with download in progress shows prompt" (private browsing) our tests/downloads/test_close_browser_with_download_in_progress_shows_prompt.py can no longer be tested in automation as of Fx150.

Firefox's "download will be canceled / leave
private browsing?" confirmation only appears on a genuine user-initiated window close.
Every close path WebDriver/Marionette can drive — tab-X click, driver.close(), chrome
window.close(), goQuitApplication, and even a real OS Cmd+W keystroke — bypasses that
check and just discards the window with no prompt. Confirmed with the private window as
the last window, an active download, warnOnQuit/tabs.warnOnClose re-enabled, and
unhandledPromptBehavior="ignore" (which would have kept any prompt open to read)

It works manually because a real user close goes through Firefox's
WindowIsClosing/quit-request path; automation's closes don't count as user-initiated. Not
a product bug — a WebDriver limitation. (The FF150 browser.download.enableDeletePrivate
feature is also changing how private downloads are handled on close.)

I'll mark the TestRail test as unsuitable.

Status: ASSIGNED → RESOLVED
Closed: 9 days ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.