mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Backed out 3 changesets (bug 1714409) for causing mochitest failures in nsSocketTransport2. CLOSED TREE
Backed out changeset bdcd60d48cfb (bug 1714409) Backed out changeset 76875cdd99a5 (bug 1714409) Backed out changeset d1fda5f59aff (bug 1714409)
This commit is contained in:
parent
2a126fe036
commit
400261d2f8
@ -3183,7 +3183,7 @@ BrowserGlue.prototype = {
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
// Use an increasing number to keep track of the current migration state.
|
||||
// Completely unrelated to the current Firefox release number.
|
||||
const UI_VERSION = 113;
|
||||
const UI_VERSION = 112;
|
||||
const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL;
|
||||
|
||||
if (!Services.prefs.prefHasUserValue("browser.migration.version")) {
|
||||
@ -3816,12 +3816,6 @@ BrowserGlue.prototype = {
|
||||
UrlbarPrefs.migrateResultBuckets();
|
||||
}
|
||||
|
||||
if (currentUIVersion < 113) {
|
||||
// Update Urlbar result buckets to add support for
|
||||
// RESULT_GROUP.HEURISTIC_ENGINE_ALIAS.
|
||||
UrlbarPrefs.migrateResultBuckets();
|
||||
}
|
||||
|
||||
// Update the migration version.
|
||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||
},
|
||||
|
@ -294,7 +294,6 @@ function makeResultBuckets({ showSearchSuggestionsFirst }) {
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_EXTENSION },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_SEARCH_TIP },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_OMNIBOX },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_ENGINE_ALIAS },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_UNIFIED_COMPLETE },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_AUTOFILL },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_TOKEN_ALIAS_ENGINE },
|
||||
|
@ -1,92 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* This module exports a provider that offers engines with aliases as heuristic
|
||||
* results.
|
||||
*/
|
||||
|
||||
var EXPORTED_SYMBOLS = ["UrlbarProviderAliasEngines"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
UrlbarProvider: "resource:///modules/UrlbarUtils.jsm",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.jsm",
|
||||
UrlbarSearchUtils: "resource:///modules/UrlbarSearchUtils.jsm",
|
||||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.jsm",
|
||||
UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
* Class used to create the provider.
|
||||
*/
|
||||
class ProviderAliasEngines extends UrlbarProvider {
|
||||
/**
|
||||
* Returns the name of this provider.
|
||||
* @returns {string} the name of this provider.
|
||||
*/
|
||||
get name() {
|
||||
return "AliasEngines";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type of this provider.
|
||||
* @returns {integer} one of the types from UrlbarUtils.PROVIDER_TYPE.*
|
||||
*/
|
||||
get type() {
|
||||
return UrlbarUtils.PROVIDER_TYPE.HEURISTIC;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this provider should be invoked for the given context.
|
||||
* If this method returns false, the providers manager won't start a query
|
||||
* with this provider, to save on resources.
|
||||
* @param {UrlbarQueryContext} queryContext The query context object
|
||||
* @returns {boolean} Whether this provider should be invoked for the search.
|
||||
*/
|
||||
async isActive(queryContext) {
|
||||
return (
|
||||
(!queryContext.restrictSource ||
|
||||
queryContext.restrictSource == UrlbarTokenizer.RESTRICT.SEARCH) &&
|
||||
!queryContext.searchMode &&
|
||||
queryContext.tokens.length
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts querying.
|
||||
* @param {object} queryContext The query context object
|
||||
* @param {function} addCallback Callback invoked by the provider to add a new
|
||||
* result.
|
||||
*/
|
||||
async startQuery(queryContext, addCallback) {
|
||||
let alias = queryContext.tokens[0]?.value;
|
||||
let engine = await UrlbarSearchUtils.engineForAlias(
|
||||
alias,
|
||||
queryContext.searchString
|
||||
);
|
||||
if (!engine) {
|
||||
return;
|
||||
}
|
||||
let query = UrlbarUtils.substringAfter(queryContext.searchString, alias);
|
||||
let result = new UrlbarResult(
|
||||
UrlbarUtils.RESULT_TYPE.SEARCH,
|
||||
UrlbarUtils.RESULT_SOURCE.SEARCH,
|
||||
...UrlbarResult.payloadAndSimpleHighlights(queryContext.tokens, {
|
||||
engine: engine.name,
|
||||
keyword: alias,
|
||||
query: query.trimStart(),
|
||||
icon: engine.iconURI?.spec,
|
||||
})
|
||||
);
|
||||
result.heuristic = true;
|
||||
addCallback(this, result);
|
||||
}
|
||||
}
|
||||
|
||||
var UrlbarProviderAliasEngines = new ProviderAliasEngines();
|
@ -36,8 +36,6 @@ var localProviderModules = {
|
||||
UrlbarProviderUnifiedComplete:
|
||||
"resource:///modules/UrlbarProviderUnifiedComplete.jsm",
|
||||
UrlbarProviderAboutPages: "resource:///modules/UrlbarProviderAboutPages.jsm",
|
||||
UrlbarProviderAliasEngines:
|
||||
"resource:///modules/UrlbarProviderAliasEngines.jsm",
|
||||
UrlbarProviderAutofill: "resource:///modules/UrlbarProviderAutofill.jsm",
|
||||
UrlbarProviderCalculator: "resource:///modules/UrlbarProviderCalculator.jsm",
|
||||
UrlbarProviderHeuristicFallback:
|
||||
|
@ -19,7 +19,6 @@ const { XPCOMUtils } = ChromeUtils.import(
|
||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.jsm",
|
||||
UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
|
||||
});
|
||||
|
||||
@ -139,24 +138,12 @@ class SearchUtils {
|
||||
*
|
||||
* @param {string} alias
|
||||
* A search engine alias. The alias string comparison is case insensitive.
|
||||
* @param {string} [searchString]
|
||||
* Optional. If provided, we also enforce that there must be a space after
|
||||
* the alias in the search string.
|
||||
* @returns {nsISearchEngine}
|
||||
* The matching engine or null if there isn't one.
|
||||
*/
|
||||
async engineForAlias(alias, searchString = null) {
|
||||
async engineForAlias(alias) {
|
||||
await Promise.all([this.init(), this._refreshEnginesByAliasPromise]);
|
||||
let engine = this._enginesByAlias.get(alias.toLocaleLowerCase());
|
||||
if (engine && searchString) {
|
||||
let query = UrlbarUtils.substringAfter(searchString, alias);
|
||||
// Match an alias only when it has a space after it. If there's no trailing
|
||||
// space, then continue to treat it as part of the search string.
|
||||
if (!UrlbarTokenizer.REGEXP_SPACES_START.test(query)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return engine || null;
|
||||
return this._enginesByAlias.get(alias.toLocaleLowerCase()) || null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,7 +55,6 @@ var UrlbarUtils = {
|
||||
GENERAL: "general",
|
||||
FORM_HISTORY: "formHistory",
|
||||
HEURISTIC_AUTOFILL: "heuristicAutofill",
|
||||
HEURISTIC_ENGINE_ALIAS: "heuristicEngineAlias",
|
||||
HEURISTIC_EXTENSION: "heuristicExtension",
|
||||
HEURISTIC_FALLBACK: "heuristicFallback",
|
||||
HEURISTIC_OMNIBOX: "heuristicOmnibox",
|
||||
@ -497,8 +496,6 @@ var UrlbarUtils = {
|
||||
}
|
||||
if (result.heuristic) {
|
||||
switch (result.providerName) {
|
||||
case "AliasEngines":
|
||||
return UrlbarUtils.RESULT_GROUP.HEURISTIC_ENGINE_ALIAS;
|
||||
case "Autofill":
|
||||
return UrlbarUtils.RESULT_GROUP.HEURISTIC_AUTOFILL;
|
||||
case "HeuristicFallback":
|
||||
@ -952,7 +949,7 @@ var UrlbarUtils = {
|
||||
"usercontextid"
|
||||
),
|
||||
allowSearchSuggestions: false,
|
||||
providers: ["UnifiedComplete", "HeuristicFallback", "AliasEngines"],
|
||||
providers: ["UnifiedComplete", "HeuristicFallback"],
|
||||
};
|
||||
if (window.gURLBar.searchMode) {
|
||||
let searchMode = window.gURLBar.searchMode;
|
||||
|
@ -18,7 +18,6 @@ EXTRA_JS_MODULES += [
|
||||
"UrlbarMuxerUnifiedComplete.jsm",
|
||||
"UrlbarPrefs.jsm",
|
||||
"UrlbarProviderAboutPages.jsm",
|
||||
"UrlbarProviderAliasEngines.jsm",
|
||||
"UrlbarProviderAutofill.jsm",
|
||||
"UrlbarProviderCalculator.jsm",
|
||||
"UrlbarProviderExtension.jsm",
|
||||
|
@ -53,7 +53,6 @@ add_task(function makeResultBuckets_true() {
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_EXTENSION },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_SEARCH_TIP },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_OMNIBOX },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_ENGINE_ALIAS },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_UNIFIED_COMPLETE },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_AUTOFILL },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_TOKEN_ALIAS_ENGINE },
|
||||
@ -140,7 +139,6 @@ add_task(function makeResultBuckets_false() {
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_EXTENSION },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_SEARCH_TIP },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_OMNIBOX },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_ENGINE_ALIAS },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_UNIFIED_COMPLETE },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_AUTOFILL },
|
||||
{ group: UrlbarUtils.RESULT_GROUP.HEURISTIC_TOKEN_ALIAS_ENGINE },
|
||||
|
@ -1,125 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Tests search engine aliases. See
|
||||
* browser/components/urlbar/tests/browser/browser_tokenAlias.js for tests of
|
||||
* the token alias list (i.e. showing all aliased engines on a "@" query).
|
||||
*/
|
||||
add_task(async function setup() {
|
||||
// Install a test engine.
|
||||
let engine = await addTestSuggestionsEngine();
|
||||
|
||||
let oldDefaultEngine = await Services.search.getDefault();
|
||||
registerCleanupFunction(async () => {
|
||||
Services.search.setDefault(oldDefaultEngine);
|
||||
Services.prefs.clearUserPref("browser.urlbar.suggest.searches");
|
||||
Services.prefs.clearUserPref("keyword.enabled");
|
||||
});
|
||||
Services.search.setDefault(engine);
|
||||
Services.prefs.setBoolPref("browser.urlbar.suggest.searches", false);
|
||||
});
|
||||
|
||||
// Basic test that uses two engines, a GET engine and a POST engine, neither
|
||||
// providing search suggestions.
|
||||
add_task(async function basicGetAndPost() {
|
||||
await SearchTestUtils.installSearchExtension({
|
||||
name: "AliasedGETMozSearch",
|
||||
keyword: "get",
|
||||
search_url: "https://s.example.com/search",
|
||||
});
|
||||
await SearchTestUtils.installSearchExtension({
|
||||
name: "AliasedPOSTMozSearch",
|
||||
keyword: "post",
|
||||
search_url: "https://s.example.com/search",
|
||||
search_url_post_params: "q={searchTerms}",
|
||||
});
|
||||
|
||||
for (let alias of ["get", "post"]) {
|
||||
let context = createContext(alias, { isPrivate: false });
|
||||
await check_results({
|
||||
context,
|
||||
matches: [
|
||||
makeSearchResult(context, {
|
||||
engineName: SUGGESTIONS_ENGINE_NAME,
|
||||
heuristic: true,
|
||||
providerName: "HeuristicFallback",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
context = createContext(`${alias} `, { isPrivate: false });
|
||||
await check_results({
|
||||
context,
|
||||
matches: [
|
||||
makeSearchResult(context, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
query: "",
|
||||
alias,
|
||||
heuristic: true,
|
||||
providerName: "AliasEngines",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
context = createContext(`${alias} fire`, { isPrivate: false });
|
||||
await check_results({
|
||||
context,
|
||||
matches: [
|
||||
makeSearchResult(context, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
query: "fire",
|
||||
alias,
|
||||
heuristic: true,
|
||||
providerName: "AliasEngines",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
context = createContext(`${alias} mozilla`, { isPrivate: false });
|
||||
await check_results({
|
||||
context,
|
||||
matches: [
|
||||
makeSearchResult(context, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
query: "mozilla",
|
||||
alias,
|
||||
heuristic: true,
|
||||
providerName: "AliasEngines",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
context = createContext(`${alias} MoZiLlA`, { isPrivate: false });
|
||||
await check_results({
|
||||
context,
|
||||
matches: [
|
||||
makeSearchResult(context, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
query: "MoZiLlA",
|
||||
alias,
|
||||
heuristic: true,
|
||||
providerName: "AliasEngines",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
context = createContext(`${alias} mozzarella mozilla`, {
|
||||
isPrivate: false,
|
||||
});
|
||||
await check_results({
|
||||
context,
|
||||
matches: [
|
||||
makeSearchResult(context, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
query: "mozzarella mozilla",
|
||||
alias,
|
||||
heuristic: true,
|
||||
providerName: "AliasEngines",
|
||||
}),
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
await cleanupPlaces();
|
||||
});
|
@ -24,7 +24,6 @@ support-files =
|
||||
[test_keywords.js]
|
||||
skip-if = os == 'linux' # bug 1474616
|
||||
[test_muxer.js]
|
||||
[test_providerAliasEngines.js]
|
||||
[test_providerHeuristicFallback.js]
|
||||
[test_providerOmnibox.js]
|
||||
[test_providerOpenTabs.js]
|
||||
|
@ -715,13 +715,23 @@ Search.prototype = {
|
||||
};
|
||||
|
||||
// For any given search, we run many queries/heuristics:
|
||||
// 1) Places keywords
|
||||
// 2) open pages not supported by history (this._switchToTabQuery)
|
||||
// 3) query based on match behavior
|
||||
// 4) Preloaded sites (currently disabled)
|
||||
// 1) by alias (as defined in SearchService)
|
||||
// 2) inline completion from search engine resultDomains
|
||||
// 3) submission for the current search engine
|
||||
// 4) Places keywords
|
||||
// 5) open pages not supported by history (this._switchToTabQuery)
|
||||
// 6) query based on match behavior
|
||||
//
|
||||
// (1) only gets run if we get any filtered tokens, since if there are no
|
||||
// (4) only gets run if we get any filtered tokens, since if there are no
|
||||
// tokens, there is nothing to match.
|
||||
//
|
||||
// (1) only runs if actions are enabled. When actions are
|
||||
// enabled, the first result is always a special result (resulting from one
|
||||
// of the queries between (1) and (4) inclusive). As such, the UI is
|
||||
// expected to auto-select the first result when actions are enabled. If the
|
||||
// first result is an inline completion result, that will also be the
|
||||
// default result and therefore be autofilled (this also happens if actions
|
||||
// are not enabled).
|
||||
|
||||
// Check for Preloaded Sites Expiry before Autofill
|
||||
await this._checkPreloadedSitesExpiry();
|
||||
@ -734,13 +744,6 @@ Search.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the first token is an action. If it is, we should set a flag
|
||||
// so we don't include it in our searches.
|
||||
this._firstTokenIsKeyword = await this._checkIfFirstTokenIsKeyword();
|
||||
if (!this.pending) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add the first heuristic result, if any. Set _addingHeuristicResult
|
||||
// to true so that when the result is added, "heuristic" can be included in
|
||||
// its style.
|
||||
@ -891,19 +894,6 @@ Search.prototype = {
|
||||
return true;
|
||||
},
|
||||
|
||||
async _checkIfFirstTokenIsKeyword() {
|
||||
if (!this._enableActions || !this._heuristicToken) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO Bug 1662172: Also check if the first token is a bookmark keyword.
|
||||
let aliasEngine = await UrlbarSearchUtils.engineForAlias(
|
||||
this._heuristicToken,
|
||||
this._originalSearchString
|
||||
);
|
||||
return !!aliasEngine;
|
||||
},
|
||||
|
||||
async _matchFirstHeuristicResult(conn) {
|
||||
if (this._searchMode) {
|
||||
// Use UrlbarProviderHeuristicFallback.
|
||||
@ -912,6 +902,15 @@ Search.prototype = {
|
||||
|
||||
// We always try to make the first result a special "heuristic" result. The
|
||||
// heuristics below determine what type of result it will be, if any.
|
||||
|
||||
if (this.pending && this._enableActions && this._heuristicToken) {
|
||||
// It may be a search engine with an alias - which works like a keyword.
|
||||
let matched = await this._matchSearchEngineAlias(this._heuristicToken);
|
||||
if (matched) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.pending && this._heuristicToken) {
|
||||
// It may be a Places keyword.
|
||||
let matched = await this._matchPlacesKeyword(this._heuristicToken);
|
||||
@ -988,6 +987,31 @@ Search.prototype = {
|
||||
return true;
|
||||
},
|
||||
|
||||
async _matchSearchEngineAlias(alias) {
|
||||
let engine = await UrlbarSearchUtils.engineForAlias(alias);
|
||||
if (!engine) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let query = UrlbarUtils.substringAfter(this._originalSearchString, alias);
|
||||
|
||||
// Match an alias only when it has a space after it. If there's no trailing
|
||||
// space, then continue to treat it as part of the search string.
|
||||
if (!UrlbarTokenizer.REGEXP_SPACES_START.test(query)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this._searchEngineAliasMatch = {
|
||||
engine,
|
||||
alias,
|
||||
query: query.trimStart(),
|
||||
};
|
||||
this._firstTokenIsKeyword = true;
|
||||
this._filterOnHost = engine.getResultDomain();
|
||||
this._addSearchEngineMatch(this._searchEngineAliasMatch);
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a search engine match.
|
||||
*
|
||||
|
@ -0,0 +1,109 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const SUGGESTIONS_ENGINE_NAME = "engine-suggestions.xml";
|
||||
|
||||
/**
|
||||
* Tests search engine aliases. See
|
||||
* browser/components/urlbar/tests/browser/browser_tokenAlias.js for tests of
|
||||
* the token alias list (i.e. showing all aliased engines on a "@" query).
|
||||
*/
|
||||
// Basic test that uses two engines, a GET engine and a POST engine, neither
|
||||
// providing search suggestions.
|
||||
add_task(async function basicGetAndPost() {
|
||||
// Note that head_autocomplete.js has already added a MozSearch engine.
|
||||
// Here we add another engine with a search alias.
|
||||
await SearchTestUtils.installSearchExtension({
|
||||
name: "AliasedGETMozSearch",
|
||||
keyword: "get",
|
||||
search_url: "https://s.example.com/search",
|
||||
});
|
||||
await SearchTestUtils.installSearchExtension({
|
||||
name: "AliasedPOSTMozSearch",
|
||||
keyword: "post",
|
||||
search_url: "https://s.example.com/search",
|
||||
search_url_post_params: "q={searchTerms}",
|
||||
});
|
||||
|
||||
await PlacesTestUtils.addVisits("https://s.example.com/search?q=firefox");
|
||||
let historyMatch = {
|
||||
value: "https://s.example.com/search?q=firefox",
|
||||
comment: "test visit for https://s.example.com/search?q=firefox",
|
||||
};
|
||||
|
||||
for (let alias of ["get", "post"]) {
|
||||
await check_autocomplete({
|
||||
search: alias,
|
||||
searchParam: "enable-actions",
|
||||
matches: [],
|
||||
});
|
||||
|
||||
await check_autocomplete({
|
||||
search: `${alias} `,
|
||||
searchParam: "enable-actions",
|
||||
matches: [
|
||||
makeSearchMatch(`${alias} `, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
searchQuery: "",
|
||||
alias,
|
||||
heuristic: true,
|
||||
}),
|
||||
historyMatch,
|
||||
],
|
||||
});
|
||||
|
||||
await check_autocomplete({
|
||||
search: `${alias} fire`,
|
||||
searchParam: "enable-actions",
|
||||
matches: [
|
||||
makeSearchMatch(`${alias} fire`, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
searchQuery: "fire",
|
||||
alias,
|
||||
heuristic: true,
|
||||
}),
|
||||
historyMatch,
|
||||
],
|
||||
});
|
||||
|
||||
await check_autocomplete({
|
||||
search: `${alias} mozilla`,
|
||||
searchParam: "enable-actions",
|
||||
matches: [
|
||||
makeSearchMatch(`${alias} mozilla`, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
searchQuery: "mozilla",
|
||||
alias,
|
||||
heuristic: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
await check_autocomplete({
|
||||
search: `${alias} MoZiLlA`,
|
||||
searchParam: "enable-actions",
|
||||
matches: [
|
||||
makeSearchMatch(`${alias} MoZiLlA`, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
searchQuery: "MoZiLlA",
|
||||
alias,
|
||||
heuristic: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
await check_autocomplete({
|
||||
search: `${alias} mozzarella mozilla`,
|
||||
searchParam: "enable-actions",
|
||||
matches: [
|
||||
makeSearchMatch(`${alias} mozzarella mozilla`, {
|
||||
engineName: `Aliased${alias.toUpperCase()}MozSearch`,
|
||||
searchQuery: "mozzarella mozilla",
|
||||
alias,
|
||||
heuristic: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
}
|
||||
await cleanup();
|
||||
});
|
@ -23,6 +23,7 @@ support-files =
|
||||
[test_keyword_search_actions.js]
|
||||
[test_multi_word_search.js]
|
||||
[test_preloaded_sites.js]
|
||||
[test_search_engine_alias.js]
|
||||
[test_search_engine_restyle.js]
|
||||
[test_special_search.js]
|
||||
[test_swap_protocol.js]
|
||||
|
Loading…
Reference in New Issue
Block a user