зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1717509 - Part 5 - Replace references to UnifiedComplete with references to UrlbarProviderPlaces. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D119310
This commit is contained in:
Родитель
aca42929d0
Коммит
8ee5ae1678
|
@ -865,7 +865,7 @@ add_task(async function test_heuristicRestricting() {
|
|||
|
||||
// Adds a non-restricting provider that returns a heuristic result. The actual
|
||||
// result created from the extension's result should *not* be a heuristic, and
|
||||
// the usual UnifiedComplete heuristic should be present.
|
||||
// the usual UrlbarProviderHeuristicFallback heuristic should be present.
|
||||
add_task(async function test_heuristicNonRestricting() {
|
||||
let ext = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
|
@ -908,7 +908,8 @@ add_task(async function test_heuristicNonRestricting() {
|
|||
let controller = UrlbarTestUtils.newMockController();
|
||||
await controller.startQuery(context);
|
||||
|
||||
// Check the results. The first result should be UnifiedComplete's heuristic.
|
||||
// Check the results. The first result should be
|
||||
// UrlbarProviderHeuristicFallback's heuristic.
|
||||
let firstResult = context.results[0];
|
||||
Assert.ok(firstResult.heuristic);
|
||||
Assert.equal(firstResult.type, UrlbarUtils.RESULT_TYPE.SEARCH);
|
||||
|
|
|
@ -585,7 +585,7 @@ class MuxerUnifiedComplete extends UrlbarMuxer {
|
|||
* True if the result can be added and false if it should be discarded.
|
||||
*/
|
||||
_canAddResult(result, state) {
|
||||
// We expect UnifiedComplete sent us the highest-ranked www. and non-www
|
||||
// We expect UrlbarProviderPlaces sent us the highest-ranked www. and non-www
|
||||
// origins, if any. Now, compare them to each other and to the heuristic
|
||||
// result.
|
||||
//
|
||||
|
|
|
@ -48,7 +48,7 @@ const PREF_URLBAR_DEFAULTS = new Map([
|
|||
|
||||
// Affects the frecency threshold of the autofill algorithm. The threshold is
|
||||
// the mean of all origin frecencies plus one standard deviation multiplied by
|
||||
// this value. See UnifiedComplete.
|
||||
// this value. See UrlbarProviderPlaces.
|
||||
["autoFill.stddevMultiplier", [0.0, "float"]],
|
||||
|
||||
// Whether using `ctrl` when hitting return/enter in the URL bar
|
||||
|
|
|
@ -363,7 +363,7 @@ class UrlbarProviderExtension extends UrlbarProvider {
|
|||
if (extResult.heuristic && this.behavior == "restricting") {
|
||||
// The muxer chooses the final heuristic result by taking the first one
|
||||
// that claims to be the heuristic. We don't want extensions to clobber
|
||||
// UnifiedComplete's heuristic, so we allow this only if the provider is
|
||||
// the default heuristic, so we allow this only if the provider is
|
||||
// restricting.
|
||||
result.heuristic = extResult.heuristic;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ class UrlbarProviderOpenTabs extends UrlbarProvider {
|
|||
*/
|
||||
isActive(queryContext) {
|
||||
// For now we don't actually use this provider to query open tabs, instead
|
||||
// we join the temp table in UnifiedComplete.
|
||||
// we join the temp table in UrlbarProviderPlaces.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -350,9 +350,9 @@ function makeUrlbarResult(tokens, info) {
|
|||
let tags = [];
|
||||
let comment = info.comment;
|
||||
|
||||
// UnifiedComplete may return "bookmark", "bookmark-tag" or "tag". In the last
|
||||
// case it should not be considered a bookmark, but an history item with tags.
|
||||
// We don't show tags for non bookmarked items though.
|
||||
// The legacy autocomplete result may return "bookmark", "bookmark-tag" or
|
||||
// "tag". In the last case it should not be considered a bookmark, but an
|
||||
// history item with tags. We don't show tags for non bookmarked items though.
|
||||
if (info.style.includes("bookmark")) {
|
||||
source = UrlbarUtils.RESULT_SOURCE.BOOKMARKS;
|
||||
} else {
|
||||
|
@ -1427,7 +1427,7 @@ class ProviderPlaces extends UrlbarProvider {
|
|||
let conn = await PlacesUtils.promiseLargeCacheDBConnection();
|
||||
|
||||
// We don't catch exceptions here as it is too late to block shutdown.
|
||||
Sqlite.shutdown.addBlocker("Places UnifiedComplete.js closing", () => {
|
||||
Sqlite.shutdown.addBlocker("UrlbarProviderPlaces closing", () => {
|
||||
// Break a possible cycle through the
|
||||
// previous result, the controller and
|
||||
// ourselves.
|
||||
|
|
|
@ -118,8 +118,7 @@ class ProviderSearchTips extends UrlbarProvider {
|
|||
}
|
||||
|
||||
get PRIORITY() {
|
||||
// Search tips are prioritized over the UnifiedComplete and top sites
|
||||
// providers.
|
||||
// Search tips are prioritized over the Places and top sites providers.
|
||||
return UrlbarProviderTopSites.PRIORITY + 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class ProviderTokenAliasEngines extends UrlbarProvider {
|
|||
}
|
||||
|
||||
get PRIORITY() {
|
||||
// Beats UrlbarProviderSearchSuggestions and UnifiedComplete.
|
||||
// Beats UrlbarProviderSearchSuggestions and UrlbarProviderPlaces.
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -177,8 +177,7 @@ class ProviderTokenAliasEngines extends UrlbarProvider {
|
|||
// We found the engine.
|
||||
|
||||
// Stop adding an autofill result once the user has typed the full
|
||||
// alias followed by a space. UrlbarProviderUnifiedComplete will take
|
||||
// over at this point.
|
||||
// alias followed by a space. We enter search mode at that point.
|
||||
if (
|
||||
lowerCaseSearchString.startsWith(alias) &&
|
||||
UrlbarTokenizer.REGEXP_SPACES_START.test(
|
||||
|
|
|
@ -43,7 +43,7 @@ class ProviderTopSites extends UrlbarProvider {
|
|||
}
|
||||
|
||||
get PRIORITY() {
|
||||
// Top sites are prioritized over the UnifiedComplete provider.
|
||||
// Top sites are prioritized over the UrlbarProviderPlaces provider.
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ class ProviderTopSites extends UrlbarProvider {
|
|||
// If system.topsites is disabled, we would get stale or empty Top Sites
|
||||
// data. We check this condition here instead of in isActive because we
|
||||
// still want this provider to be restricting even if this is not true. If
|
||||
// it wasn't restricting, we would show the results from UnifiedComplete's
|
||||
// it wasn't restricting, we would show the results from UrlbarProviderPlaces's
|
||||
// empty search behaviour. We aren't interested in those since they are very
|
||||
// similar to Top Sites and thus might be confusing, especially since users
|
||||
// can configure Top Sites but cannot configure the default empty search
|
||||
|
|
|
@ -182,12 +182,11 @@ var UrlbarUtils = {
|
|||
SUGGESTED: 2,
|
||||
},
|
||||
|
||||
// UnifiedComplete's autocomplete results store their titles and tags together
|
||||
// in their comments. This separator is used to separate them. When we
|
||||
// rewrite UnifiedComplete for quantumbar, we should stop using this old hack
|
||||
// and store titles and tags separately. It's important that this be a
|
||||
// character that no title would ever have. We use \x1F, the non-printable
|
||||
// unit separator.
|
||||
// UrlbarProviderPlaces's autocomplete results store their titles and tags
|
||||
// together in their comments. This separator is used to separate them.
|
||||
// After bug 1717511, we should stop using this old hack and store titles and
|
||||
// tags separately. It's important that this be a character that no title
|
||||
// would ever have. We use \x1F, the non-printable unit separator.
|
||||
TITLE_TAGS_SEPARATOR: "\x1F",
|
||||
|
||||
// Regex matching single word hosts with an optional port; no spaces, auth or
|
||||
|
|
|
@ -25,9 +25,7 @@ If you are interested in the technical details, you might want to skip ahead to
|
|||
Codebase
|
||||
--------
|
||||
|
||||
Most of the address bar code lives in `browser/components/urlbar <https://searchfox.org/mozilla-central/source/browser/components/urlbar/>`_.
|
||||
A separate and important back-end piece currently is `toolkit/components/places/UnifiedComplete.jsm <https://searchfox.org/mozilla-central/source/toolkit/components/places/UnifiedComplete.jsm>`_, which was carried over from awesomebar and is
|
||||
undergoing refactoring for quantumbar.
|
||||
The address bar code lives in `browser/components/urlbar <https://searchfox.org/mozilla-central/source/browser/components/urlbar/>`_.
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
|
|
|
@ -353,8 +353,10 @@ Event Extra
|
|||
This is only present for ``engagement`` events.
|
||||
- ``provider``
|
||||
The name of the result provider for the selected result. Existing values
|
||||
are: ``HeuristicFallback``, ``Autofill``, ``UnifiedComplete``,
|
||||
are: ``HeuristicFallback``, ``Autofill``, ``Places``,
|
||||
``TokenAliasEngines``, ``SearchSuggestions``, ``UrlbarProviderTopSites``.
|
||||
Data from before Firefox 91 will also list ``UnifiedComplete`` as a
|
||||
provider. This is equivalent to ``Places``.
|
||||
Values can also be defined by `URLBar provider experiments`_.
|
||||
|
||||
.. _URLBar provider experiments: experiments.html#developing-address-bar-extensions
|
||||
|
|
|
@ -127,7 +127,7 @@ add_task(async function oneTip_nonRestricting() {
|
|||
|
||||
let expectedResults = Array.from(results);
|
||||
|
||||
// UnifiedComplete's heuristic search result
|
||||
// UrlbarProviderHeuristicFallback's heuristic search result
|
||||
expectedResults.unshift({
|
||||
type: UrlbarUtils.RESULT_TYPE.SEARCH,
|
||||
source: UrlbarUtils.RESULT_SOURCE.SEARCH,
|
||||
|
@ -182,7 +182,7 @@ add_task(async function threeTips_nonRestricting() {
|
|||
|
||||
let expectedResults = Array.from(results);
|
||||
|
||||
// UnifiedComplete's heuristic search result
|
||||
// UrlbarProviderHeuristicFallback's heuristic search result
|
||||
expectedResults.unshift({
|
||||
type: UrlbarUtils.RESULT_TYPE.SEARCH,
|
||||
source: UrlbarUtils.RESULT_SOURCE.SEARCH,
|
||||
|
|
|
@ -360,7 +360,7 @@ const tests = [
|
|||
numWords: "1",
|
||||
selIndex: val => parseInt(val) > 0,
|
||||
selType: "bookmark",
|
||||
provider: "UnifiedComplete",
|
||||
provider: "Places",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
@ -15,13 +15,6 @@ add_task(async function setup() {
|
|||
);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
"unifiedComplete",
|
||||
"@mozilla.org/autocomplete/search;1?name=unifiedcomplete",
|
||||
"nsIAutoCompleteSearch"
|
||||
);
|
||||
|
||||
add_task(async function test_restrictions() {
|
||||
await PlacesTestUtils.addVisits([
|
||||
{ uri: "http://history.com/", title: "match" },
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
const HEURISTIC_FALLBACK_PROVIDERNAME = "HeuristicFallback";
|
||||
const UNIFIEDCOMPLETE_PROVIDERNAME = "UnifiedComplete";
|
||||
const PLACES_PROVIDERNAME = "Places";
|
||||
|
||||
/**
|
||||
* Helpful reminder of the `autofilled` and `completed` properties in the
|
||||
|
@ -333,7 +333,7 @@ add_autofill_task(async function httpPrefixShouldNotMatchHTTPS() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://" + url,
|
||||
title: "test visit for https://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -526,7 +526,7 @@ add_autofill_task(async function httpsPrefixShouldNotMatchHTTP() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://" + url,
|
||||
title: "test visit for http://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -627,7 +627,7 @@ add_autofill_task(async function frecency() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://" + url,
|
||||
title: "test visit for https://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -650,7 +650,7 @@ add_autofill_task(async function frecency() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://" + url,
|
||||
title: "test visit for https://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -673,7 +673,7 @@ add_autofill_task(async function frecency() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://" + url,
|
||||
title: "test visit for https://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -714,7 +714,7 @@ add_autofill_task(async function frecency() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://not-" + url,
|
||||
title: "test visit for https://not-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -726,8 +726,8 @@ add_autofill_task(async function frecency() {
|
|||
await PlacesTestUtils.addVisits([{ uri: "https://not-" + url }]);
|
||||
}
|
||||
|
||||
// In the `origins` case, the failure to make an autofill
|
||||
// match means UnifiedComplete should not create a heuristic result. In the
|
||||
// In the `origins` case, the failure to make an autofill match means
|
||||
// HeuristicFallback should not create a heuristic result. In the
|
||||
// `!origins` case, autofill should still happen since there's no threshold
|
||||
// comparison.
|
||||
context = createContext(search, { isPrivate: false });
|
||||
|
@ -743,12 +743,12 @@ add_autofill_task(async function frecency() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://not-" + url,
|
||||
title: "test visit for https://not-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "https://" + url,
|
||||
title: "test visit for https://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -766,7 +766,7 @@ add_autofill_task(async function frecency() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://not-" + url,
|
||||
title: "test visit for https://not-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -876,7 +876,7 @@ add_autofill_task(async function bookmarkBelowThreshold() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://not-" + url,
|
||||
title: "test visit for http://not-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -1412,7 +1412,7 @@ add_autofill_task(async function suggestBookmarkFalse_visit_1() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://non-matching-" + url,
|
||||
title: "test visit for http://non-matching-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
];
|
||||
if (origins) {
|
||||
|
@ -1504,7 +1504,7 @@ add_autofill_task(async function suggestBookmarkFalse_visit_prefix_1() {
|
|||
makeVisitResult(context, {
|
||||
uri: "ftp://" + url,
|
||||
title: "test visit for ftp://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -1542,7 +1542,7 @@ add_autofill_task(async function suggestBookmarkFalse_visit_prefix_2() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://non-matching-" + url,
|
||||
title: "test visit for http://non-matching-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -1580,7 +1580,7 @@ add_autofill_task(async function suggestBookmarkFalse_visit_prefix_3() {
|
|||
makeVisitResult(context, {
|
||||
uri: "ftp://non-matching-" + url,
|
||||
title: "test visit for ftp://non-matching-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2048,12 +2048,12 @@ add_autofill_task(async function suggestBookmarkFalse_visitedBookmarkBelow() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://some-other-" + url,
|
||||
title: "test visit for http://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "http://" + url,
|
||||
title: "test visit for http://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2074,12 +2074,12 @@ add_autofill_task(async function suggestBookmarkFalse_visitedBookmarkBelow() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://some-other-" + url,
|
||||
title: "test visit for http://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "http://" + url,
|
||||
title: "A bookmark",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2124,12 +2124,12 @@ add_autofill_task(
|
|||
makeVisitResult(context, {
|
||||
uri: "http://some-other-" + url,
|
||||
title: "test visit for http://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "http://" + url,
|
||||
title: "test visit for http://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2153,12 +2153,12 @@ add_autofill_task(
|
|||
makeVisitResult(context, {
|
||||
uri: "http://some-other-" + url,
|
||||
title: "test visit for http://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "http://" + url,
|
||||
title: "A bookmark",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2204,12 +2204,12 @@ add_autofill_task(
|
|||
makeVisitResult(context, {
|
||||
uri: "ftp://some-other-" + url,
|
||||
title: "test visit for ftp://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "ftp://" + url,
|
||||
title: "test visit for ftp://" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2233,12 +2233,12 @@ add_autofill_task(
|
|||
makeVisitResult(context, {
|
||||
uri: "ftp://some-other-" + url,
|
||||
title: "test visit for ftp://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "ftp://" + url,
|
||||
title: "A bookmark",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2284,12 +2284,12 @@ add_autofill_task(
|
|||
makeVisitResult(context, {
|
||||
uri: "http://some-other-" + url,
|
||||
title: "test visit for http://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "http://non-matching-" + url,
|
||||
title: "test visit for http://non-matching-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2313,12 +2313,12 @@ add_autofill_task(
|
|||
makeVisitResult(context, {
|
||||
uri: "http://some-other-" + url,
|
||||
title: "test visit for http://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "http://non-matching-" + url,
|
||||
title: "A bookmark",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2364,12 +2364,12 @@ add_autofill_task(
|
|||
makeVisitResult(context, {
|
||||
uri: "ftp://some-other-" + url,
|
||||
title: "test visit for ftp://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "ftp://non-matching-" + url,
|
||||
title: "test visit for ftp://non-matching-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -2393,12 +2393,12 @@ add_autofill_task(
|
|||
makeVisitResult(context, {
|
||||
uri: "ftp://some-other-" + url,
|
||||
title: "test visit for ftp://some-other-" + url,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "ftp://non-matching-" + url,
|
||||
title: "A bookmark",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// The autoFill.searchEngines pref autofills the domains of engines registered
|
||||
// with the search service. That's what this test checks. It's a different
|
||||
// path in UnifiedComplete.js from normal moz_places autofill, which is tested
|
||||
// path in ProviderAutofill from normal moz_places autofill, which is tested
|
||||
// in test_autofill_origins.js and test_autofill_urls.js.
|
||||
|
||||
"use strict";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"use strict";
|
||||
|
||||
const HEURISTIC_FALLBACK_PROVIDERNAME = "HeuristicFallback";
|
||||
const UNIFIEDCOMPLETE_PROVIDERNAME = "UnifiedComplete";
|
||||
const PLACES_PROVIDERNAME = "Places";
|
||||
|
||||
// "example.com/foo/" should match http://example.com/foo/.
|
||||
testEngine_setup();
|
||||
|
@ -101,7 +101,7 @@ add_task(async function port() {
|
|||
uri: "http://example.com:8888/foo/bar/baz",
|
||||
title: "test visit for http://example.com:8888/foo/bar/baz",
|
||||
tags: [],
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -261,7 +261,7 @@ add_task(async function test_prefix_autofill() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://mozilla.org/test/",
|
||||
title: "test visit for http://mozilla.org/test/",
|
||||
providerName: "UnifiedComplete",
|
||||
providerName: "Places",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -78,7 +78,7 @@ add_task(async function test_protocol_trimming() {
|
|||
makeVisitResult(context, {
|
||||
uri: visit.uri.spec,
|
||||
title: visit.title,
|
||||
providerName: "UnifiedComplete",
|
||||
providerName: "Places",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -108,7 +108,7 @@ add_task(async function test_protocol_trimming() {
|
|||
makeVisitResult(context, {
|
||||
uri: visit.uri.spec,
|
||||
title: visit.title,
|
||||
providerName: "UnifiedComplete",
|
||||
providerName: "Places",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const AUTOFILL_PROVIDERNAME = "Autofill";
|
||||
const HEURISTIC_FALLBACK_PROVIDERNAME = "HeuristicFallback";
|
||||
const UNIFIEDCOMPLETE_PROVIDERNAME = "UnifiedComplete";
|
||||
const PLACES_PROVIDERNAME = "Places";
|
||||
|
||||
testEngine_setup();
|
||||
|
||||
|
@ -27,7 +27,7 @@ add_task(async function test_casing_1() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://mozilla.org/test/",
|
||||
title: "test visit for http://mozilla.org/test/",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -143,7 +143,7 @@ add_task(async function test_untrimmed_casing() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://mozilla.org/Test/",
|
||||
title: "test visit for http://mozilla.org/Test/",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -169,7 +169,7 @@ add_task(async function test_untrimmed_www_casing() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://www.mozilla.org/Test/",
|
||||
title: "test visit for http://www.mozilla.org/Test/",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -66,7 +66,7 @@ add_task(async function timerIsCancelled() {
|
|||
let context = createContext("m", { isPrivate: false });
|
||||
await PlacesTestUtils.promiseAsyncUpdates();
|
||||
info("Manually set up query and then overwrite it.");
|
||||
// slowProvider is a stand-in for a slow UnifiedComplete returning a
|
||||
// slowProvider is a stand-in for a slow UrlbarProviderPlaces returning a
|
||||
// non-heuristic result.
|
||||
let slowProvider = new SlowHeuristicProvider({
|
||||
results: [
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
// This is a simple test to check the UnifiedComplete provider works, it is not
|
||||
// This is a simple test to check the Places provider works, it is not
|
||||
// intended to check all the edge cases, because that component is already
|
||||
// covered by a good amount of tests.
|
||||
|
||||
const SUGGEST_PREF = "browser.urlbar.suggest.searches";
|
||||
const SUGGEST_ENABLED_PREF = "browser.search.suggest.enabled";
|
||||
|
||||
add_task(async function test_unifiedComplete() {
|
||||
add_task(async function test_places() {
|
||||
Services.prefs.setBoolPref(SUGGEST_PREF, true);
|
||||
Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, true);
|
||||
let engine = await addTestSuggestionsEngine();
|
||||
|
@ -100,7 +100,7 @@ add_task(async function test_bookmarkBehaviorDisabled_tagged() {
|
|||
Services.prefs.setBoolPref(SUGGEST_PREF, false);
|
||||
Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, false);
|
||||
|
||||
// Disable the bookmark behavior in UnifiedComplete.
|
||||
// Disable the bookmark behavior.
|
||||
Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", false);
|
||||
|
||||
let controller = UrlbarTestUtils.newMockController();
|
||||
|
@ -154,7 +154,7 @@ add_task(async function test_bookmarkBehaviorDisabled_untagged() {
|
|||
Services.prefs.setBoolPref(SUGGEST_PREF, false);
|
||||
Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, false);
|
||||
|
||||
// Disable the bookmark behavior in UnifiedComplete.
|
||||
// Disable the bookmark behavior.
|
||||
Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", false);
|
||||
|
||||
let controller = UrlbarTestUtils.newMockController();
|
||||
|
@ -204,7 +204,7 @@ add_task(async function test_diacritics() {
|
|||
Services.prefs.setBoolPref(SUGGEST_PREF, false);
|
||||
Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, false);
|
||||
|
||||
// Enable the bookmark behavior in UnifiedComplete.
|
||||
// Enable the bookmark behavior.
|
||||
Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
|
||||
|
||||
let controller = UrlbarTestUtils.newMockController();
|
|
@ -282,7 +282,7 @@ add_task(async function conflictingEngines() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://foobar.com/",
|
||||
title: "test visit for https://foobar.com/",
|
||||
providerName: "UnifiedComplete",
|
||||
providerName: "Places",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -422,7 +422,7 @@ add_task(async function test_publicSuffix() {
|
|||
makeVisitResult(context, {
|
||||
uri: "https://test.mytest.it/",
|
||||
title: "test visit for https://test.mytest.it/",
|
||||
providerName: "UnifiedComplete",
|
||||
providerName: "Places",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
const HEURISTIC_FALLBACK_PROVIDERNAME = "HeuristicFallback";
|
||||
const UNIFIEDCOMPLETE_PROVIDERNAME = "UnifiedComplete";
|
||||
const PLACES_PROVIDERNAME = "Places";
|
||||
|
||||
testEngine_setup();
|
||||
|
||||
|
@ -28,12 +28,12 @@ add_task(async function test_no_slash() {
|
|||
uri: "file:///c:/test.html",
|
||||
title: "test visit for file:///c:/test.html",
|
||||
iconUri: UrlbarUtils.ICON.DEFAULT,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
makeVisitResult(context, {
|
||||
uri: "http://file.org/test/",
|
||||
title: "test visit for http://file.org/test/",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -64,7 +64,7 @@ add_task(async function test_w_slash() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://file.org/test/",
|
||||
title: "test visit for http://file.org/test/",
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -114,7 +114,7 @@ add_task(async function test_nonhost() {
|
|||
uri: "file:///c:/test.html",
|
||||
title: "test visit for file:///c:/test.html",
|
||||
iconUri: UrlbarUtils.ICON.DEFAULT,
|
||||
providerName: UNIFIEDCOMPLETE_PROVIDERNAME,
|
||||
providerName: PLACES_PROVIDERNAME,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -84,7 +84,7 @@ add_task(async function test_searchEngine_noautoFill() {
|
|||
makeVisitResult(context, {
|
||||
uri: "http://my.search.com/samplepage/",
|
||||
title: "test visit for http://my.search.com/samplepage/",
|
||||
providerName: "UnifiedComplete",
|
||||
providerName: "Places",
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
@ -454,10 +454,10 @@ add_task(async function test_special_searches() {
|
|||
setSuggestPrefsToFalse();
|
||||
Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
|
||||
Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
|
||||
// The purpose of this test is to verify what is being sent by UnifiedComplete.
|
||||
// The purpose of this test is to verify what is being sent by ProviderPlaces.
|
||||
// It will send 10 results, but the heuristic result pushes the last result
|
||||
// out of the panel. We set maxRichResults to a high value to test the full
|
||||
// output of UnifiedComplete.
|
||||
// output of ProviderPlaces.
|
||||
Services.prefs.setIntPref("browser.urlbar.maxRichResults", 20);
|
||||
context = createContext("foo", { isPrivate: false });
|
||||
await check_results({
|
||||
|
|
|
@ -40,6 +40,8 @@ skip-if = os == 'linux' # bug 1474616
|
|||
[test_providerKeywords.js]
|
||||
[test_providerOmnibox.js]
|
||||
[test_providerOpenTabs.js]
|
||||
[test_providerPlaces.js]
|
||||
[test_providerPlaces_duplicate_entries.js]
|
||||
[test_providerPlaces_nonEnglish.js]
|
||||
[test_providerPreloaded.js]
|
||||
[test_providersManager.js]
|
||||
|
@ -47,8 +49,6 @@ skip-if = os == 'linux' # bug 1474616
|
|||
[test_providersManager_maxResults.js]
|
||||
[test_providerTabToSearch.js]
|
||||
[test_providerTabToSearch_partialHost.js]
|
||||
[test_providerUnifiedComplete.js]
|
||||
[test_providerUnifiedComplete_duplicate_entries.js]
|
||||
[test_query_url.js]
|
||||
[test_queryScorer.js]
|
||||
[test_remote_tabs.js]
|
||||
|
|
Загрузка…
Ссылка в новой задаче