Files
sousa-gecko/toolkit/components/alerts
Florian Quèze c939e07a32 Bug 2030275 - Close the node-principal alert by its effective name in test_principal.html, r=saschanaz.
testNodePrincipal is the only subtest whose alert uses a content principal. For
content-principal notifications, nsIAlertNotification.name returns the
notification's internal id (an origin-namespaced hash) rather than the
app-provided name, and nsXULAlerts registers the alert window under that id. So
closeAlert("nodePrincipal") matches nothing and is a silent no-op, leaving the
alert to be dismissed only by its auto-close animation. When that animation does
not complete the alert never closes and the test times out.

Close by alert.name -- the id the window is actually registered under -- so the
alert is dismissed deterministically instead of relying on the animation.

Differential Revision: https://phabricator.services.mozilla.com/D310065
2026-07-02 19:28:07 +00:00
..
…
…
…
…