зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1160663 - Allow hilighting the Pocket button via UITour. r=MattN
--HG-- extra : rebase_source : 4e11a41e11f3a32c4f207bd4fc22043eccf799c5
This commit is contained in:
Родитель
a843ee9494
Коммит
d76848212a
|
@ -191,6 +191,7 @@ this.UITour = {
|
|||
return loopBrowser.contentDocument.querySelector(".signin-link");
|
||||
},
|
||||
}],
|
||||
["pocket", {query: "#pocket-button"}],
|
||||
["privateWindow", {query: "#privatebrowsing-button"}],
|
||||
["quit", {query: "#PanelUI-quit"}],
|
||||
["readerMode-urlBar", {query: "#reader-mode-button"}],
|
||||
|
|
|
@ -11,6 +11,26 @@ Components.utils.import("resource:///modules/UITour.jsm");
|
|||
|
||||
let hasWebIDE = Services.prefs.getBoolPref("devtools.webide.widget.enabled");
|
||||
|
||||
let hasPocket = false;
|
||||
if (Services.prefs.getBoolPref("browser.pocket.enabled")) {
|
||||
let isEnabledForLocale = true;
|
||||
if (Services.prefs.getBoolPref("browser.pocket.useLocaleList")) {
|
||||
let chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Ci.nsIXULChromeRegistry);
|
||||
let browserLocale = chromeRegistry.getSelectedLocale("browser");
|
||||
let enabledLocales = [];
|
||||
try {
|
||||
enabledLocales = Services.prefs.getCharPref("browser.pocket.enabledLocales").split(' ');
|
||||
} catch (ex) {
|
||||
Cu.reportError(ex);
|
||||
}
|
||||
isEnabledForLocale = enabledLocales.indexOf(browserLocale) != -1;
|
||||
}
|
||||
if (isEnabledForLocale) {
|
||||
hasPocket = true;
|
||||
}
|
||||
}
|
||||
|
||||
function test() {
|
||||
requestLongerTimeout(2);
|
||||
UITourTest();
|
||||
|
@ -37,6 +57,7 @@ let tests = [
|
|||
"home",
|
||||
"loop",
|
||||
"devtools",
|
||||
...(hasPocket ? ["pocket"] : []),
|
||||
"privateWindow",
|
||||
"quit",
|
||||
"readerMode-urlBar",
|
||||
|
@ -68,6 +89,7 @@ let tests = [
|
|||
"loop",
|
||||
"devtools",
|
||||
"home",
|
||||
...(hasPocket ? ["pocket"] : []),
|
||||
"privateWindow",
|
||||
"quit",
|
||||
"readerMode-urlBar",
|
||||
|
@ -104,6 +126,7 @@ let tests = [
|
|||
"home",
|
||||
"loop",
|
||||
"devtools",
|
||||
...(hasPocket ? ["pocket"] : []),
|
||||
"privateWindow",
|
||||
"quit",
|
||||
"readerMode-urlBar",
|
||||
|
|
Загрузка…
Ссылка в новой задаче