gecko-dev/browser/base/content/test/general/browser_bug624734.js
Shane Hughes f0a33c9d81 Bug 1783207 - Add ellipsis to some menu label strings. r=flod
The copy guidance recommends adding an ellipsis to the end of labels for
controls that require an additional step to complete the action
specified by the label. We have some menuitems and panel buttons that
open a bookmark dialog or the edit bookmark panel that don't have an
ellipsis, so add that. Also, the form "Bookmark this x" has been changed
to "Bookmark x" in menuitems. Also, there's a "Print Selection" menuitem
that needed an ellipsis. Thanks for the review!

Differential Revision: https://phabricator.services.mozilla.com/D154320
2022-08-11 17:48:11 +00:00

48 lines
1.3 KiB
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
// Bug 624734 - Star UI has no tooltip until bookmarked page is visited
function finishTest() {
let elem = document.getElementById("context-bookmarkpage");
let l10n = document.l10n.getAttributes(elem);
ok(
[
"main-context-menu-bookmark-page",
"main-context-menu-bookmark-page-with-shortcut",
"main-context-menu-bookmark-page-mac",
].includes(l10n.id)
);
gBrowser.removeCurrentTab();
finish();
}
function test() {
waitForExplicitFinish();
let tab = (gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser));
CustomizableUI.addWidgetToArea(
"bookmarks-menu-button",
CustomizableUI.AREA_NAVBAR,
0
);
BrowserTestUtils.browserLoaded(tab.linkedBrowser).then(() => {
if (BookmarkingUI.status == BookmarkingUI.STATUS_UPDATING) {
waitForCondition(
() => BookmarkingUI.status != BookmarkingUI.STATUS_UPDATING,
finishTest,
"BookmarkingUI was updating for too long"
);
} else {
CustomizableUI.removeWidgetFromArea("bookmarks-menu-button");
finishTest();
}
});
BrowserTestUtils.loadURI(
tab.linkedBrowser,
"http://example.com/browser/browser/base/content/test/general/dummy_page.html"
);
}