зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset a526a04f7f4c (bug 1662509) for Reftest failures in js/src/tests/test262/language/literals/regexp/named-groups/invalid-non-id-start-groupspecifier-4.js. CLOSED TREE
This commit is contained in:
Родитель
aa01acb495
Коммит
89114e2339
|
@ -355,11 +355,6 @@ pref("browser.urlbar.update2.localOneOffs", false);
|
|||
pref("browser.urlbar.update2.oneOffsRefresh", false);
|
||||
#endif
|
||||
|
||||
// Controls the empty search behavior in Search Mode:
|
||||
// 0 - Show nothing
|
||||
// 1 - Show search history
|
||||
// 2 - Show search and browsing history
|
||||
pref("browser.urlbar.update2.emptySearchBehavior", 2),
|
||||
// Whether we display a tab-to-complete result when the user types an engine
|
||||
// name.
|
||||
pref("browser.urlbar.update2.tabToComplete", false);
|
||||
|
|
|
@ -167,12 +167,6 @@ const PREF_URLBAR_DEFAULTS = new Map([
|
|||
// one-off buttons.
|
||||
["update2.disableOneOffsHorizontalKeyNavigation", false],
|
||||
|
||||
// Controls the empty search behavior in Search Mode:
|
||||
// 0 - Show nothing
|
||||
// 1 - Show search history
|
||||
// 2 - Show search and browsing history
|
||||
["update2.emptySearchBehavior", 2],
|
||||
|
||||
// Whether the urlbar displays one-offs to filter searches to history,
|
||||
// bookmarks, or tabs.
|
||||
["update2.localOneOffs", false],
|
||||
|
|
|
@ -95,17 +95,11 @@ class ProviderSearchSuggestions extends UrlbarProvider {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!this._allowSuggestions(queryContext)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let wantsLocalSuggestions =
|
||||
UrlbarPrefs.get("maxHistoricalSearchSuggestions") &&
|
||||
(!UrlbarPrefs.get("update2") ||
|
||||
queryContext.trimmedSearchString ||
|
||||
UrlbarPrefs.get("update2.emptySearchBehavior") != 0);
|
||||
|
||||
return wantsLocalSuggestions || this._allowRemoteSuggestions(queryContext);
|
||||
return (
|
||||
this._allowSuggestions(queryContext) &&
|
||||
(UrlbarPrefs.get("maxHistoricalSearchSuggestions") ||
|
||||
this._allowRemoteSuggestions(queryContext))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,13 +63,6 @@ class ProviderUnifiedComplete extends UrlbarProvider {
|
|||
* @returns {boolean} Whether this provider should be invoked for the search.
|
||||
*/
|
||||
isActive(queryContext) {
|
||||
if (
|
||||
!queryContext.trimmedSearchString &&
|
||||
UrlbarPrefs.get("update2") &&
|
||||
UrlbarPrefs.get("update2.emptySearchBehavior") < 2
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,9 +81,6 @@ add_task(async function setup() {
|
|||
|
||||
add_task(async function emptySearch() {
|
||||
await BrowserTestUtils.withNewTab("about:robots", async function(browser) {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["browser.urlbar.update2.emptySearchBehavior", 2]],
|
||||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
value: "",
|
||||
|
@ -95,7 +92,6 @@ add_task(async function emptySearch() {
|
|||
await checkResults(expectedFormHistoryResults);
|
||||
await UrlbarTestUtils.exitSearchMode(window, { clickClose: true });
|
||||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
await SpecialPowers.popPrefEnv();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -112,9 +108,6 @@ add_task(async function emptySearch_withHistory() {
|
|||
},
|
||||
]);
|
||||
await BrowserTestUtils.withNewTab("about:robots", async function(browser) {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["browser.urlbar.update2.emptySearchBehavior", 2]],
|
||||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
value: "",
|
||||
|
@ -141,50 +134,6 @@ add_task(async function emptySearch_withHistory() {
|
|||
|
||||
await UrlbarTestUtils.exitSearchMode(window, { clickClose: true });
|
||||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
await SpecialPowers.popPrefEnv();
|
||||
});
|
||||
|
||||
await PlacesUtils.history.clear();
|
||||
});
|
||||
|
||||
add_task(async function emptySearch_behavior() {
|
||||
// URLs with the same host as the search engine.
|
||||
await PlacesTestUtils.addVisits([`http://mochi.test/`]);
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:robots", async function(browser) {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["browser.urlbar.update2.emptySearchBehavior", 0]],
|
||||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
value: "",
|
||||
});
|
||||
await UrlbarTestUtils.enterSearchMode(window);
|
||||
Assert.equal(gURLBar.value, "", "Urlbar value should be cleared.");
|
||||
// For the empty search case, we expect to get the form history relative to
|
||||
// the picked engine, history without redirects, and no heuristic.
|
||||
await checkResults([]);
|
||||
await UrlbarTestUtils.exitSearchMode(window, { clickClose: true });
|
||||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
await SpecialPowers.popPrefEnv();
|
||||
});
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:robots", async function(browser) {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["browser.urlbar.update2.emptySearchBehavior", 1]],
|
||||
});
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
value: "",
|
||||
});
|
||||
await UrlbarTestUtils.enterSearchMode(window);
|
||||
Assert.equal(gURLBar.value, "", "Urlbar value should be cleared.");
|
||||
// For the empty search case, we expect to get the form history relative to
|
||||
// the picked engine, history without redirects, and no heuristic.
|
||||
await checkResults([...expectedFormHistoryResults]);
|
||||
await UrlbarTestUtils.exitSearchMode(window, { clickClose: true });
|
||||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
await SpecialPowers.popPrefEnv();
|
||||
});
|
||||
|
||||
await PlacesUtils.history.clear();
|
||||
|
|
|
@ -385,10 +385,7 @@ add_task(async function test_oneoff_selected_with_private_engine_keyboard() {
|
|||
|
||||
add_task(async function test_alias_no_query() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["browser.urlbar.update2", true],
|
||||
["browser.urlbar.update2.emptySearchBehavior", 2],
|
||||
],
|
||||
set: [["browser.urlbar.update2", true]],
|
||||
});
|
||||
info(
|
||||
"Test that 'Search in a Private Window' doesn't appear if an alias is typed with no query"
|
||||
|
@ -411,10 +408,7 @@ add_task(async function test_alias_no_query() {
|
|||
|
||||
add_task(async function test_alias_query() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["browser.urlbar.update2", true],
|
||||
["browser.urlbar.update2.emptySearchBehavior", 2],
|
||||
],
|
||||
set: [["browser.urlbar.update2", true]],
|
||||
});
|
||||
info(
|
||||
"Test that 'Search in a Private Window' appears when an alias is typed with a query"
|
||||
|
|
Загрузка…
Ссылка в новой задаче