Bug 1983869 - Fix 'extensions settings' link click handling in post-install popup to preventing it to break customize mode. a=dmeehan
Original Revision: https://phabricator.services.mozilla.com/D264085 Differential Revision: https://phabricator.services.mozilla.com/D264286
This commit is contained in:
committed by
dmeehan@mozilla.com
parent
a2e0149356
commit
82394c910e
@@ -852,6 +852,13 @@ customElements.define(
|
||||
BrowserAddonUI.openAddonsMgr(
|
||||
"addons://detail/" + encodeURIComponent(addonId)
|
||||
);
|
||||
// The settings link element has its href set to "#" to be
|
||||
// accessible with keyboard navigation, and so we call
|
||||
// preventDefault to avoid the "#" href to be implicitly
|
||||
// added to the browser chrome window url (See Bug 1983869
|
||||
// for more details of the regression that the implicit
|
||||
// change to the chrome window urls triggers).
|
||||
event.preventDefault();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1617,6 +1617,15 @@ add_task(async function testVerifyPostInstallPopupWithDataCollection() {
|
||||
`addons://detail/${encodeURIComponent(extensionId)}`,
|
||||
"Expected about:addons to show the detail view of the extension"
|
||||
);
|
||||
|
||||
// Asserting the browser chrome window url to guard against regressions
|
||||
// like Bug 1983869.
|
||||
Assert.equal(
|
||||
AppConstants.BROWSER_CHROME_URL,
|
||||
tab.ownerGlobal.window.location.href,
|
||||
"Expect browser chrome window url to be unchanged"
|
||||
);
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
||||
// Dismiss the popup by clicking "OK".
|
||||
|
||||
Reference in New Issue
Block a user