Backed out changeset ed42b5ee3c94 (bug 1096248) for bc-1 test failures

This commit is contained in:
Carsten "Tomcat" Book 2014-11-12 13:25:01 +01:00
Родитель 8d08f416df
Коммит 75e5b5aa12
2 изменённых файлов: 1 добавлений и 12 удалений

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

@ -22,7 +22,6 @@ const PREF_ENABLED = [ "autocomplete.enabled", true ];
const PREF_AUTOFILL = [ "autoFill", true ]; const PREF_AUTOFILL = [ "autoFill", true ];
const PREF_AUTOFILL_TYPED = [ "autoFill.typed", true ]; const PREF_AUTOFILL_TYPED = [ "autoFill.typed", true ];
const PREF_AUTOFILL_SEARCHENGINES = [ "autoFill.searchEngines", true ]; const PREF_AUTOFILL_SEARCHENGINES = [ "autoFill.searchEngines", true ];
const PREF_RESTYLESEARCHES = [ "restyleSearches", false ];
const PREF_DELAY = [ "delay", 50 ]; const PREF_DELAY = [ "delay", 50 ];
const PREF_BEHAVIOR = [ "matchBehavior", MATCH_BOUNDARY_ANYWHERE ]; const PREF_BEHAVIOR = [ "matchBehavior", MATCH_BOUNDARY_ANYWHERE ];
const PREF_DEFAULT_BEHAVIOR = [ "default.behavior", DEFAULT_BEHAVIOR ]; const PREF_DEFAULT_BEHAVIOR = [ "default.behavior", DEFAULT_BEHAVIOR ];
@ -372,7 +371,6 @@ XPCOMUtils.defineLazyGetter(this, "Prefs", () => {
store.autofill = prefs.get(...PREF_AUTOFILL); store.autofill = prefs.get(...PREF_AUTOFILL);
store.autofillTyped = prefs.get(...PREF_AUTOFILL_TYPED); store.autofillTyped = prefs.get(...PREF_AUTOFILL_TYPED);
store.autofillSearchEngines = prefs.get(...PREF_AUTOFILL_SEARCHENGINES); store.autofillSearchEngines = prefs.get(...PREF_AUTOFILL_SEARCHENGINES);
store.restyleSearches = prefs.get(...PREF_RESTYLESEARCHES);
store.delay = prefs.get(...PREF_DELAY); store.delay = prefs.get(...PREF_DELAY);
store.matchBehavior = prefs.get(...PREF_BEHAVIOR); store.matchBehavior = prefs.get(...PREF_BEHAVIOR);
store.filterJavaScript = prefs.get(...PREF_FILTER_JS); store.filterJavaScript = prefs.get(...PREF_FILTER_JS);
@ -1046,7 +1044,7 @@ Search.prototype = {
} }
// Restyle past searches, unless they are bookmarks or special results. // Restyle past searches, unless they are bookmarks or special results.
if (Prefs.restyleSearches && match.style == "favicon") { if (match.style == "favicon") {
this._maybeRestyleSearchMatch(match); this._maybeRestyleSearchMatch(match);
} }

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

@ -15,20 +15,11 @@ add_task(function* test_searchEngine() {
addBookmark({ uri: uri2, title: "Terms - SearchEngine Search" }); addBookmark({ uri: uri2, title: "Terms - SearchEngine Search" });
do_log_info("Past search terms should be styled, unless bookmarked"); do_log_info("Past search terms should be styled, unless bookmarked");
Services.prefs.setBoolPref("browser.urlbar.restyleSearches", true);
yield check_autocomplete({ yield check_autocomplete({
search: "term", search: "term",
matches: [ { uri: uri1, title: "Terms", searchEngine: "SearchEngine", style: ["favicon", "search"] }, matches: [ { uri: uri1, title: "Terms", searchEngine: "SearchEngine", style: ["favicon", "search"] },
{ uri: uri2, title: "Terms - SearchEngine Search", style: ["bookmark"] } ] { uri: uri2, title: "Terms - SearchEngine Search", style: ["bookmark"] } ]
}); });
do_log_info("Past search terms should not be styled if restyling is disabled");
Services.prefs.setBoolPref("browser.urlbar.restyleSearches", false);
yield check_autocomplete({
search: "term",
matches: [ { uri: uri1, title: "Terms - SearchEngine Search" },
{ uri: uri2, title: "Terms - SearchEngine Search", style: ["bookmark"] } ]
});
yield cleanup(); yield cleanup();
}); });