Bug 1246460 - re-add pocket bookmarks button menuitem now that its original insertion point is gone, r=MattN

--HG--
extra : commitid : A9lqhSgbnNS
extra : rebase_source : 80c764656c1f686d726199db379a0a12c8cba86e
extra : amend_source : 64dcabc9584747e542b8fb54b7b91b9bbdb0f09f
This commit is contained in:
Gijs Kruitbosch 2016-02-08 10:08:43 +00:00
Родитель 1b8fd05302
Коммит c406e403fc
4 изменённых файлов: 25 добавлений и 1 удалений

2
browser/extensions/pocket/bootstrap.js поставляемый
Просмотреть файл

@ -422,7 +422,7 @@ var PocketOverlay = {
}
// add to bookmarks-menu-button
sib = document.getElementById("BMB_subscribeToPageMenuitem");
sib = document.getElementById("BMB_bookmarksToolbar");
if (sib && !document.getElementById("BMB_pocket")) {
let menu = createElementWithAttrs(document, "menuitem", {
"id": "BMB_pocket",

Просмотреть файл

@ -14,4 +14,6 @@ FINAL_TARGET_PP_FILES.features['firefox@getpocket.com'] += [
'install.rdf.in'
]
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
JAR_MANIFESTS += ['jar.mn']

Просмотреть файл

@ -0,0 +1 @@
[browser_pocket_ui_check.js]

Просмотреть файл

@ -0,0 +1,21 @@
"use strict";
add_task(function*() {
let pocketAddon = yield new Promise(resolve => {
AddonManager.getAddonByID("firefox@getpocket.com", resolve);
});
if (!pocketAddon) {
ok(true, "Pocket is not installed");
return;
}
if (!Services.prefs.getBoolPref("extensions.pocket.enabled")) {
ok(true, "Pocket add-on is not enabled");
return;
}
for (let id of ["panelMenu_pocket", "menu_pocket", "BMB_pocket",
"panelMenu_pocketSeparator", "menu_pocketSeparator",
"BMB_pocketSeparator"]) {
ok(document.getElementById(id), "Should see element with id " + id);
}
});