Bug 1803255 - Fix and enable the tests in mail/base/test/webextensions. r=aleca
Differential Revision: https://phabricator.services.mozilla.com/D163412 --HG-- extra : rebase_source : 5c05103b8d8bce7e5141310268fbc6180ea04c26
This commit is contained in:
Родитель
09820f0467
Коммит
3bd442593f
|
@ -513,7 +513,7 @@ var commandController = {
|
|||
},
|
||||
|
||||
_getViewCommandStatus(commandType) {
|
||||
if (!gViewWrapper.dbView) {
|
||||
if (!gViewWrapper?.dbView) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -540,14 +540,6 @@
|
|||
</arrowscrollbox>
|
||||
</tabs>
|
||||
|
||||
<box id="notification-popup-box" align="center" hidden="true">
|
||||
<html:img id="addons-notification-icon"
|
||||
src="chrome://messenger/skin/icons/new/compact/extension.svg"
|
||||
alt=""
|
||||
class="notification-anchor-icon"
|
||||
role="button" />
|
||||
</box>
|
||||
|
||||
<toolbar is="customizable-toolbar" id="tabbar-toolbar"
|
||||
toolboxid="mail-toolbox"
|
||||
class="themeable-full"
|
||||
|
|
|
@ -29,11 +29,8 @@ support-files =
|
|||
|
||||
[browser_extension_install_experiment.js]
|
||||
[browser_extension_sideloading.js]
|
||||
skip-if = true # TODO
|
||||
[browser_extension_update_background.js]
|
||||
skip-if = true # TODO
|
||||
[browser_extension_update_background_noprompt.js]
|
||||
skip-if = true # TODO
|
||||
[browser_permissions_installTrigger.js]
|
||||
[browser_permissions_local_file.js]
|
||||
[browser_permissions_mozAddonManager.js]
|
||||
|
|
|
@ -229,6 +229,8 @@ add_task(async function test_sideloading() {
|
|||
addons = PanelUI.addonNotificationContainer;
|
||||
is(addons.children.length, 1, "Have 1 menu entry for sideloaded extensions");
|
||||
|
||||
PanelUI.hide();
|
||||
|
||||
// Open the Add-Ons Manager
|
||||
win = await openAddonsMgr(`addons://detail/${encodeURIComponent(ID3)}`);
|
||||
|
||||
|
|
|
@ -676,14 +676,14 @@ add_task(async function() {
|
|||
});
|
||||
});
|
||||
|
||||
// Any opened tabs should be closed by the end of the test.
|
||||
registerCleanupFunction(() => {
|
||||
let tabmail = document.getElementById("tabmail");
|
||||
is(tabmail.tabInfo.length, 1);
|
||||
// The appmenu should be closed by the end of the test.
|
||||
ok(PanelUI.panel.state == "closed", "Main menu is closed.");
|
||||
|
||||
while (tabmail.tabInfo.length > 1) {
|
||||
tabmail.closeTab(tabmail.tabInfo[1]);
|
||||
}
|
||||
// Any opened tabs should be closed by the end of the test.
|
||||
let tabmail = document.getElementById("tabmail");
|
||||
is(tabmail.tabInfo.length, 1, "All tabs are closed.");
|
||||
tabmail.closeOtherTabs(0);
|
||||
});
|
||||
|
||||
let collectedTelemetry = [];
|
||||
|
|
|
@ -908,7 +908,7 @@ var gExtensionsNotifications = {
|
|||
update.addon.name,
|
||||
]);
|
||||
this._createAddonButton(text, update.addon.iconURL, evt => {
|
||||
ExtensionsUI.showUpdate(tabmail.selectedBrowser, update);
|
||||
ExtensionsUI.showUpdate(tabmail, update);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -931,7 +931,7 @@ var gExtensionsNotifications = {
|
|||
// removed immediately while processing this event, and PanelUI is
|
||||
// unable to identify which panel should be closed automatically.
|
||||
PanelUI.hide();
|
||||
ExtensionsUI.showSideloaded(tabmail.selectedBrowser, addon);
|
||||
ExtensionsUI.showSideloaded(tabmail, addon);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -29,6 +29,13 @@
|
|||
</html:search-bar>
|
||||
<html:div class="spacer"></html:div>
|
||||
</html:div>
|
||||
<html:div id="notification-popup-box" hidden="true">
|
||||
<html:img id="addons-notification-icon"
|
||||
src="chrome://messenger/skin/icons/new/compact/extension.svg"
|
||||
alt=""
|
||||
class="notification-anchor-icon"
|
||||
role="button" />
|
||||
</html:div>
|
||||
<toolbarbutton id="button-appmenu"
|
||||
type="menu"
|
||||
badged="true"
|
||||
|
|
|
@ -177,7 +177,7 @@ function PopupNotifications(tabbrowser, panel, iconBox, options = {}) {
|
|||
if (!tabbrowser) {
|
||||
throw new Error("Invalid tabbrowser");
|
||||
}
|
||||
if (iconBox && ChromeUtils.getClassName(iconBox) != "XULElement") {
|
||||
if (iconBox && ChromeUtils.getClassName(iconBox) != "HTMLDivElement") {
|
||||
throw new Error("Invalid iconBox");
|
||||
}
|
||||
if (ChromeUtils.getClassName(panel) != "XULPopupElement") {
|
||||
|
|
|
@ -776,6 +776,12 @@ hr[is="pane-splitter"][resize-direction="horizontal"].splitter-collapsed:is(
|
|||
border-radius: 0;
|
||||
}
|
||||
|
||||
#notification-popup-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
}
|
||||
|
||||
#notification-popup-box > .notification-anchor-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
@ -789,7 +795,6 @@ hr[is="pane-splitter"][resize-direction="horizontal"].splitter-collapsed:is(
|
|||
notifications are */
|
||||
.notification-anchor-icon {
|
||||
-moz-user-focus: normal;
|
||||
margin-inline-start: 9px;
|
||||
}
|
||||
|
||||
.notification-anchor-icon:not([showing]) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче