зеркало из https://github.com/mozilla/gecko-dev.git
Bug 701298 - Fix browser_searching.js when update channel is aurora/beta/release; r=dtownsend
This commit is contained in:
Родитель
0540d30eaa
Коммит
335f0043ea
|
@ -19,6 +19,22 @@ var gProvider;
|
|||
var gServer;
|
||||
var gAddonInstalled = false;
|
||||
|
||||
var channel = "default";
|
||||
try {
|
||||
channel = Services.prefs.getCharPref("app.update.channel");
|
||||
}
|
||||
catch (e) { }
|
||||
if (channel != "aurora" &&
|
||||
channel != "beta" &&
|
||||
channel != "release") {
|
||||
var version = "nightly";
|
||||
}
|
||||
else {
|
||||
version = Services.appinfo.version.replace(/^([^\.]+\.[0-9]+[a-z]*).*/gi, "$1");
|
||||
}
|
||||
|
||||
const COMPATIBILITY_PREF = "extensions.checkCompatibility." + version;
|
||||
|
||||
function test() {
|
||||
requestLongerTimeout(2);
|
||||
// Turn on searching for this test
|
||||
|
@ -591,7 +607,7 @@ add_test(function() {
|
|||
|
||||
// Tests that incompatible add-ons are shown with a warning if compatibility checking is disabled
|
||||
add_test(function() {
|
||||
Services.prefs.setBoolPref("extensions.checkCompatibility.nightly", false);
|
||||
Services.prefs.setBoolPref(COMPATIBILITY_PREF, false);
|
||||
search("incompatible", false, function() {
|
||||
var item = get_addon_item("remote5");
|
||||
is_element_visible(item, "Incompatible addon should be visible");
|
||||
|
@ -600,7 +616,7 @@ add_test(function() {
|
|||
var item = get_addon_item("remote6");
|
||||
is(item, null, "Addon incompatible with the product should not be visible");
|
||||
|
||||
Services.prefs.clearUserPref("extensions.checkCompatibility.nightly");
|
||||
Services.prefs.clearUserPref(COMPATIBILITY_PREF);
|
||||
run_next_test();
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче