commit ddd5433aa42d9166d7e85bdf6e97b0c3e3dddec8 parent 861d8beceecacf34502faf002337fd712e259fc5 Author: Daisuke Akatsuka <daisuke@birchill.co.jp> Date: Thu, 11 Dec 2025 01:12:06 +0000 Bug 1995227: Remove fallbackTitle special handling r=adw Differential Revision: https://phabricator.services.mozilla.com/D275571 Diffstat:
30 files changed, 178 insertions(+), 200 deletions(-)
diff --git a/browser/components/urlbar/UrlbarProviderAutofill.sys.mjs b/browser/components/urlbar/UrlbarProviderAutofill.sys.mjs @@ -866,6 +866,7 @@ export class UrlbarProviderAutofill extends UrlbarProvider { icon: UrlbarUtils.getIconForUrl(finalCompleteValue), }; + let noVisitAction = !!title; if (title) { payload.title = title; } else { @@ -879,7 +880,7 @@ export class UrlbarProviderAutofill extends UrlbarProvider { trimEmptyQuery: true, trimSlash: !this._searchString.includes("/"), }); - payload.fallbackTitle = fallbackTitle; + payload.title = fallbackTitle; } return new lazy.UrlbarResult({ @@ -892,6 +893,7 @@ export class UrlbarProviderAutofill extends UrlbarProvider { selectionStart: queryContext.searchString.length, selectionEnd: autofilledValue.length, type: autofilledType, + noVisitAction, }, payload, highlights: { diff --git a/browser/components/urlbar/UrlbarProviderClipboard.sys.mjs b/browser/components/urlbar/UrlbarProviderClipboard.sys.mjs @@ -119,12 +119,9 @@ export class UrlbarProviderClipboard extends UrlbarProvider { type: UrlbarUtils.RESULT_TYPE.URL, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, payload: { - fallbackTitle: UrlbarUtils.prepareUrlForDisplay( - this.#previousClipboard.value, - { - trimURL: false, - } - ), + title: UrlbarUtils.prepareUrlForDisplay(this.#previousClipboard.value, { + trimURL: false, + }), url: this.#previousClipboard.value, icon: "chrome://global/skin/icons/clipboard.svg", isBlockable: true, diff --git a/browser/components/urlbar/UrlbarProviderHeuristicFallback.sys.mjs b/browser/components/urlbar/UrlbarProviderHeuristicFallback.sys.mjs @@ -163,7 +163,7 @@ export class UrlbarProviderHeuristicFallback extends UrlbarProvider { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, payload: { - fallbackTitle: searchUrl, + title: searchUrl, url: searchUrl, }, }); @@ -225,7 +225,7 @@ export class UrlbarProviderHeuristicFallback extends UrlbarProvider { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, payload: { - fallbackTitle: displayURL, + title: displayURL, url: escapedURL, icon: iconUri, }, diff --git a/browser/components/urlbar/UrlbarResult.sys.mjs b/browser/components/urlbar/UrlbarResult.sys.mjs @@ -370,9 +370,6 @@ export class UrlbarResult { case lazy.UrlbarUtils.RESULT_TYPE.URL: case lazy.UrlbarUtils.RESULT_TYPE.OMNIBOX: case lazy.UrlbarUtils.RESULT_TYPE.REMOTE_TAB: - if (this.payload.fallbackTitle) { - return "fallbackTitle"; - } return "title"; case lazy.UrlbarUtils.RESULT_TYPE.SEARCH: if (this.payload.title) { diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs @@ -2002,9 +2002,6 @@ UrlbarUtils.RESULT_PAYLOAD_SCHEMA = { dupedHeuristic: { type: "boolean", }, - fallbackTitle: { - type: "string", - }, frecency: { type: "number", }, diff --git a/browser/components/urlbar/UrlbarView.sys.mjs b/browser/components/urlbar/UrlbarView.sys.mjs @@ -2241,7 +2241,12 @@ export class UrlbarView { } // fall-through default: - if (result.heuristic && !result.payload.title) { + if ( + result.heuristic && + result.payload.url && + result.providerName != "UrlbarProviderHistoryUrlHeuristic" && + !result.autofill?.noVisitAction + ) { isVisitAction = true; } else if ( (result.providerName != lazy.UrlbarProviderQuickSuggest.name || diff --git a/browser/components/urlbar/tests/browser/browser_clipboard.js b/browser/components/urlbar/tests/browser/browser_clipboard.js @@ -69,9 +69,9 @@ add_task(async function testFormattingOfClipboardSuggestion() { "The Clipboard suggestion URL should not be decoded." ); Assert.equal( - result.payload.fallbackTitle, + result.payload.title, unicodeURL, - "The Clipboard suggestion fallback title should be decoded." + "The Clipboard suggestion title should be decoded." ); } ); diff --git a/browser/components/urlbar/tests/unit/head.js b/browser/components/urlbar/tests/unit/head.js @@ -856,9 +856,6 @@ function makeSearchResult( * @param {object} options Options for the result. * @param {string} options.title * The page title. - * @param {string} [options.fallbackTitle] - * The provider has capability to use the actual page title though, - * when the provider can’t get the page title, use this value as the fallback. * @param {string} options.uri * The page URI. * @param {Array} [options.tags] @@ -878,7 +875,6 @@ function makeVisitResult( queryContext, { title, - fallbackTitle, uri, iconUri, providerName, @@ -895,10 +891,6 @@ function makeVisitResult( payload.title = title; } - if (fallbackTitle) { - payload.fallbackTitle = fallbackTitle; - } - if ( !heuristic && providerName != "UrlbarProviderAboutPages" && diff --git a/browser/components/urlbar/tests/unit/test_autofill_adaptiveHistory.js b/browser/components/urlbar/tests/unit/test_autofill_adaptiveHistory.js @@ -244,7 +244,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -307,7 +307,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.org/"), + title: UrlbarTestUtils.trimURL("http://example.org/"), heuristic: true, }), context => @@ -331,7 +331,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -936,7 +936,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -1001,7 +1001,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -1059,7 +1059,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/test", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/test"), + title: UrlbarTestUtils.trimURL("http://example.com/test"), heuristic: true, }), context => @@ -1128,7 +1128,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -1155,7 +1155,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -1179,7 +1179,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -1203,7 +1203,7 @@ const TEST_DATA = [ context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -1320,7 +1320,7 @@ add_task(async function urlCase() { matches: [ makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), makeVisitResult(context, { @@ -1353,9 +1353,7 @@ add_task(async function urlCase() { matches: [ makeVisitResult(context, { uri: "http://example.com/abc/def", - fallbackTitle: UrlbarTestUtils.trimURL( - "http://example.com/abc/def" - ), + title: UrlbarTestUtils.trimURL("http://example.com/abc/def"), heuristic: true, }), makeVisitResult(context, { @@ -1428,7 +1426,7 @@ add_task(async function decayTest() { matches: [ makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com"), + title: UrlbarTestUtils.trimURL("http://example.com"), heuristic: true, }), makeVisitResult(context, { diff --git a/browser/components/urlbar/tests/unit/test_autofill_bookmarked.js b/browser/components/urlbar/tests/unit/test_autofill_bookmarked.js @@ -146,7 +146,7 @@ add_task(async function test_www() { matches: [ makeVisitResult(context, { uri: `http://www.${host}/`, - fallbackTitle: UrlbarTestUtils.trimURL(`http://www.${host}`), + title: UrlbarTestUtils.trimURL(`http://www.${host}`), heuristic: true, }), ], @@ -160,7 +160,7 @@ add_task(async function test_www() { matches: [ makeVisitResult(context, { uri: `http://www.${host}/`, - fallbackTitle: UrlbarTestUtils.trimURL(`http://www.${host}`), + title: UrlbarTestUtils.trimURL(`http://www.${host}`), heuristic: true, }), ], @@ -174,7 +174,7 @@ add_task(async function test_www() { matches: [ makeVisitResult(context, { uri: `http://www.${host}/`, - fallbackTitle: UrlbarTestUtils.trimURL(`http://www.${host}`), + title: UrlbarTestUtils.trimURL(`http://www.${host}`), heuristic: true, }), ], diff --git a/browser/components/urlbar/tests/unit/test_autofill_do_not_trim.js b/browser/components/urlbar/tests/unit/test_autofill_do_not_trim.js @@ -26,7 +26,7 @@ add_task(async function test_not_autofill_ws_1() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/", - fallbackTitle: "mozilla.org/", + title: "mozilla.org/", source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -46,7 +46,7 @@ add_task(async function test_not_autofill_ws_2() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/", - fallbackTitle: "mozilla.org/", + title: "mozilla.org/", iconUri: "page-icon:http://mozilla.org/", source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, @@ -67,7 +67,7 @@ add_task(async function test_not_autofill_ws_3() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/link", - fallbackTitle: "mozilla.org/link", + title: "mozilla.org/link", iconUri: "page-icon:http://mozilla.org/", source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, diff --git a/browser/components/urlbar/tests/unit/test_autofill_functional.js b/browser/components/urlbar/tests/unit/test_autofill_functional.js @@ -132,7 +132,7 @@ add_task(async function test_prefix_autofill() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://mozilla.org"), + title: UrlbarTestUtils.trimURL("http://mozilla.org"), heuristic: true, }), makeVisitResult(context, { diff --git a/browser/components/urlbar/tests/unit/test_autofill_origins.js b/browser/components/urlbar/tests/unit/test_autofill_origins.js @@ -182,7 +182,7 @@ add_task(async function portNoMatch1() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${origin}:89/`, - fallbackTitle: `${origin}:89/`, + title: `${origin}:89/`, iconUri: "", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -206,7 +206,7 @@ add_task(async function portNoMatch2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${origin}:9/`, - fallbackTitle: `${origin}:9/`, + title: `${origin}:9/`, iconUri: "", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -230,7 +230,7 @@ add_task(async function trailingSlash_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://example/", - fallbackTitle: "example/", + title: "example/", iconUri: "page-icon:http://example/", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -549,7 +549,7 @@ add_task(async function suggestHistoryFalse_bookmark_multiple() { matches: [ makeVisitResult(context, { uri: baseURL, - fallbackTitle: UrlbarTestUtils.trimURL(baseURL), + title: UrlbarTestUtils.trimURL(baseURL), heuristic: true, }), makeBookmarkResult(context, { @@ -592,7 +592,7 @@ add_task(async function suggestHistoryFalse_bookmark_prefix_multiple() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${search}/`, - fallbackTitle: `${search}/`, + title: `${search}/`, iconUri: "", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -612,7 +612,7 @@ add_task(async function suggestHistoryFalse_bookmark_prefix_multiple() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${search}/`, - fallbackTitle: `${search}/`, + title: `${search}/`, iconUri: "", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -632,7 +632,7 @@ add_task(async function suggestHistoryFalse_bookmark_prefix_multiple() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${search}/`, - fallbackTitle: `${search}/`, + title: `${search}/`, iconUri: "", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -652,7 +652,7 @@ add_task(async function suggestHistoryFalse_bookmark_prefix_multiple() { matches: [ makeVisitResult(context, { uri: baseURL, - fallbackTitle: UrlbarTestUtils.trimURL(baseURL), + title: UrlbarTestUtils.trimURL(baseURL), heuristic: true, }), makeBookmarkResult(context, { @@ -841,7 +841,7 @@ add_task(async function about() { context => makeVisitResult(context, { uri: "about:blan", - fallbackTitle: "about:blan", + title: "about:blan", source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), diff --git a/browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js b/browser/components/urlbar/tests/unit/test_autofill_originsAndQueries.js @@ -171,7 +171,7 @@ add_autofill_task(async function wwwShouldNotMatchNoWWW() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://www." + search + "/", - fallbackTitle: "www." + search + "/", + title: "www." + search + "/", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, }), @@ -188,7 +188,7 @@ add_autofill_task(async function wwwShouldNotMatchNoWWW() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://www." + search, - fallbackTitle: "www." + search, + title: "www." + search, iconUri: `page-icon:http://www.${host}/`, heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -306,7 +306,7 @@ add_autofill_task(async function prefixWWWShouldNotMatchNoWWW() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://www.${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -331,7 +331,7 @@ add_autofill_task(async function httpPrefixShouldNotMatchHTTPS() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -407,7 +407,7 @@ add_autofill_task(async function httpsWWWShouldNotMatchNoWWW() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://www." + search + "/", - fallbackTitle: "www." + search + "/", + title: "www." + search + "/", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, }), @@ -424,7 +424,7 @@ add_autofill_task(async function httpsWWWShouldNotMatchNoWWW() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://www." + search, - fallbackTitle: "www." + search, + title: "www." + search, iconUri: `page-icon:http://www.${host}/`, heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -498,7 +498,7 @@ add_autofill_task(async function httpsPrefixWWWShouldNotMatchNoWWW() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:https://www.${host}/`, providerame: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -523,7 +523,7 @@ add_autofill_task(async function httpsPrefixShouldNotMatchHTTP() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:https://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -829,7 +829,7 @@ add_autofill_task(async function frecency() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://" + search, - fallbackTitle: search, + title: search, iconUri: `page-icon:http://${host}/`, heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1055,7 +1055,7 @@ add_autofill_task(async function suggestHistoryFalse_visit() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://" + search, - fallbackTitle: search, + title: search, iconUri: `page-icon:http://${host}/`, heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1113,7 +1113,7 @@ add_autofill_task(async function suggestHistoryFalse_visit_prefix() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://" + search, - fallbackTitle: search, + title: search, iconUri: `page-icon:http://${host}/`, heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1217,7 +1217,7 @@ add_autofill_task(async function suggestHistoryFalse_bookmark_1() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://" + search, - fallbackTitle: search, + title: search, iconUri: `page-icon:http://${host}/`, heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1315,7 +1315,7 @@ add_autofill_task(async function suggestHistoryFalse_bookmark_prefix_1() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1355,7 +1355,7 @@ add_autofill_task(async function suggestHistoryFalse_bookmark_prefix_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1395,7 +1395,7 @@ add_autofill_task(async function suggestHistoryFalse_bookmark_prefix_3() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1477,7 +1477,7 @@ add_autofill_task(async function suggestBookmarkFalse_visit_1() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: UrlbarUtils.stripPrefixAndTrim(prefixedUrl, { + title: UrlbarUtils.stripPrefixAndTrim(prefixedUrl, { stripHttp: true, stripHttps: true, })[0], @@ -1548,7 +1548,7 @@ add_autofill_task(async function suggestBookmarkFalse_visit_prefix_1() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1586,7 +1586,7 @@ add_autofill_task(async function suggestBookmarkFalse_visit_prefix_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1624,7 +1624,7 @@ add_autofill_task(async function suggestBookmarkFalse_visit_prefix_3() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1689,7 +1689,7 @@ add_autofill_task(async function suggestBookmarkFalse_unvisitedBookmark() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://" + search, - fallbackTitle: search, + title: search, iconUri: `page-icon:http://${host}/`, heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1740,7 +1740,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1778,7 +1778,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1816,7 +1816,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1854,7 +1854,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -1965,7 +1965,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2009,7 +2009,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2053,7 +2053,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: prefixedUrl, - fallbackTitle: prefixedUrl, + title: prefixedUrl, heuristic: true, iconUri: origins ? "" : `page-icon:http://${host}/`, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2187,7 +2187,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${search}/`, - fallbackTitle: `http://${search}/`, + title: `http://${search}/`, heuristic: true, iconUri: "", providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2217,7 +2217,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${search}/`, - fallbackTitle: `http://${search}/`, + title: `http://${search}/`, heuristic: true, iconUri: "", providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2268,7 +2268,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${search}/`, - fallbackTitle: `http://${search}/`, + title: `http://${search}/`, heuristic: true, iconUri: "", providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2298,7 +2298,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${search}/`, - fallbackTitle: `http://${search}/`, + title: `http://${search}/`, heuristic: true, iconUri: "", providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2349,7 +2349,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${search}/`, - fallbackTitle: `http://${search}/`, + title: `http://${search}/`, heuristic: true, iconUri: "", providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2379,7 +2379,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${search}/`, - fallbackTitle: `http://${search}/`, + title: `http://${search}/`, heuristic: true, iconUri: "", providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2430,7 +2430,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${search}/`, - fallbackTitle: `http://${search}/`, + title: `http://${search}/`, heuristic: true, iconUri: "", providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -2460,7 +2460,7 @@ add_autofill_task( makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${search}/`, - fallbackTitle: `http://${search}/`, + title: `http://${search}/`, heuristic: true, iconUri: "", providerName: HEURISTIC_FALLBACK_PROVIDERNAME, diff --git a/browser/components/urlbar/tests/unit/test_autofill_prefix_fallback.js b/browser/components/urlbar/tests/unit/test_autofill_prefix_fallback.js @@ -35,7 +35,7 @@ add_task(async function () { matches: [ makeVisitResult(context, { uri: `https://www.${host}/`, - fallbackTitle: UrlbarTestUtils.trimURL(`https://www.${host}`), + title: UrlbarTestUtils.trimURL(`https://www.${host}`), heuristic: true, }), makeBookmarkResult(context, { @@ -64,7 +64,7 @@ add_task(async function () { matches: [ makeVisitResult(context, { uri: `https://${host}/`, - fallbackTitle: UrlbarTestUtils.trimURL(`https://${host}`), + title: UrlbarTestUtils.trimURL(`https://${host}`), heuristic: true, }), makeBookmarkResult(context, { diff --git a/browser/components/urlbar/tests/unit/test_autofill_urls.js b/browser/components/urlbar/tests/unit/test_autofill_urls.js @@ -74,7 +74,7 @@ add_task(async function portNoMatch() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://example.com:8999/f", - fallbackTitle: "example.com:8999/f", + title: "example.com:8999/f", iconUri: "page-icon:http://example.com:8999/", heuristic: true, providerName: HEURISTIC_FALLBACK_PROVIDERNAME, @@ -99,9 +99,7 @@ add_task(async function port() { matches: [ makeVisitResult(context, { uri: "http://example.com:8888/foo/bar/", - fallbackTitle: UrlbarTestUtils.trimURL( - "http://example.com:8888/foo/bar/" - ), + title: UrlbarTestUtils.trimURL("http://example.com:8888/foo/bar/"), heuristic: true, }), makeVisitResult(context, { @@ -206,7 +204,7 @@ add_task(async function uriFragmentCaseSensitiveNoMatch() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://example.com/#t", - fallbackTitle: "http://example.com/#t", + title: "http://example.com/#t", heuristic: true, }), makeVisitResult(context, { @@ -263,7 +261,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/"), + title: UrlbarTestUtils.trimURL("http://example.com/"), heuristic: true, }), context => @@ -283,7 +281,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/", { + title: UrlbarTestUtils.trimURL("http://example.com/", { removeSingleTrailingSlash: false, }), heuristic: true, @@ -305,7 +303,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/ABC/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/ABC/"), + title: UrlbarTestUtils.trimURL("http://example.com/ABC/"), heuristic: true, }), context => @@ -325,7 +323,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/ABC/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/ABC/"), + title: UrlbarTestUtils.trimURL("http://example.com/ABC/"), heuristic: true, }), context => @@ -345,7 +343,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/ABC/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/ABC/"), + title: UrlbarTestUtils.trimURL("http://example.com/ABC/"), heuristic: true, }), context => @@ -365,7 +363,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/abc/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/abc/"), + title: UrlbarTestUtils.trimURL("http://example.com/abc/"), heuristic: true, }), context => @@ -415,9 +413,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/abc/def", - fallbackTitle: UrlbarTestUtils.trimURL( - "http://example.com/abc/def" - ), + title: UrlbarTestUtils.trimURL("http://example.com/abc/def"), heuristic: true, }), context => @@ -437,7 +433,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/ABC/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/ABC/"), + title: UrlbarTestUtils.trimURL("http://example.com/ABC/"), heuristic: true, }), context => @@ -457,7 +453,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/abc/", - fallbackTitle: UrlbarTestUtils.trimURL("http://example.com/abc/"), + title: UrlbarTestUtils.trimURL("http://example.com/abc/"), heuristic: true, }), context => @@ -492,9 +488,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/abc/def", - fallbackTitle: UrlbarTestUtils.trimURL( - "http://example.com/abc/def" - ), + title: UrlbarTestUtils.trimURL("http://example.com/abc/def"), heuristic: true, }), context => @@ -529,9 +523,7 @@ add_task(async function uriCase() { context => makeVisitResult(context, { uri: "http://example.com/abc/def", - fallbackTitle: UrlbarTestUtils.trimURL( - "http://example.com/abc/def" - ), + title: UrlbarTestUtils.trimURL("http://example.com/abc/def"), heuristic: true, }), context => @@ -636,7 +628,7 @@ add_task(async function originLooksLikePrefix2() { matches: [ makeVisitResult(context, { uri: "http://localhost:8888/foo/", - fallbackTitle: UrlbarTestUtils.trimURL("http://localhost:8888/foo/"), + title: UrlbarTestUtils.trimURL("http://localhost:8888/foo/"), heuristic: true, }), makeVisitResult(context, { @@ -864,9 +856,7 @@ add_task(async function wwwHistory() { context => makeVisitResult(context, { uri: "https://www.example.com/ABC", - fallbackTitle: UrlbarTestUtils.trimURL( - "https://www.example.com/ABC" - ), + title: UrlbarTestUtils.trimURL("https://www.example.com/ABC"), heuristic: true, }), context => diff --git a/browser/components/urlbar/tests/unit/test_avoid_stripping_to_empty_tokens.js b/browser/components/urlbar/tests/unit/test_avoid_stripping_to_empty_tokens.js @@ -29,7 +29,7 @@ add_task(async function test_protocol_trimming() { matches: [ makeVisitResult(context, { uri: prot + "://www.mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL(prot + "://www.mozilla.org"), + title: UrlbarTestUtils.trimURL(prot + "://www.mozilla.org"), heuristic: true, }), makeVisitResult(context, { @@ -49,7 +49,7 @@ add_task(async function test_protocol_trimming() { matches: [ makeVisitResult(context, { uri: prot + "://www.mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL(prot + "://www.mozilla.org"), + title: UrlbarTestUtils.trimURL(prot + "://www.mozilla.org"), heuristic: true, }), makeVisitResult(context, { @@ -68,7 +68,7 @@ add_task(async function test_protocol_trimming() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${input.trim()}/`, - fallbackTitle: `${input.trim()}/`, + title: `${input.trim()}/`, iconUri: "", heuristic: true, providerName: "UrlbarProviderHeuristicFallback", diff --git a/browser/components/urlbar/tests/unit/test_casing.js b/browser/components/urlbar/tests/unit/test_casing.js @@ -20,7 +20,7 @@ add_task(async function test_casing_1() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://mozilla.org"), + title: UrlbarTestUtils.trimURL("http://mozilla.org"), heuristic: true, }), makeVisitResult(context, { @@ -136,7 +136,7 @@ add_task(async function test_untrimmed_casing() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://mozilla.org"), + title: UrlbarTestUtils.trimURL("http://mozilla.org"), heuristic: true, }), makeVisitResult(context, { @@ -162,7 +162,7 @@ add_task(async function test_untrimmed_www_casing() { matches: [ makeVisitResult(context, { uri: "http://www.mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://www.mozilla.org"), + title: UrlbarTestUtils.trimURL("http://www.mozilla.org"), heuristic: true, }), makeVisitResult(context, { diff --git a/browser/components/urlbar/tests/unit/test_escaping_escapeSelf.js b/browser/components/urlbar/tests/unit/test_escaping_escapeSelf.js @@ -46,7 +46,7 @@ add_task(async function test_escape() { matches: [ makeVisitResult(context, { uri: "http://escapeduri/%40", - fallbackTitle: "http://escapeduri/@", + title: "http://escapeduri/@", iconUri: "page-icon:http://escapeduri/", source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, diff --git a/browser/components/urlbar/tests/unit/test_history_bookmark_results_on_search_service_failure.js b/browser/components/urlbar/tests/unit/test_history_bookmark_results_on_search_service_failure.js @@ -56,7 +56,7 @@ add_task( uri: "http://cat/", heuristic: true, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, - fallbackTitle: "cat/", + title: "cat/", }), makeBookmarkResult(context, { title: "cat", diff --git a/browser/components/urlbar/tests/unit/test_keywords.js b/browser/components/urlbar/tests/unit/test_keywords.js @@ -20,7 +20,7 @@ add_task(async function test_non_keyword() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://mozilla.org"), + title: UrlbarTestUtils.trimURL("http://mozilla.org"), heuristic: true, }), makeBookmarkResult(context, { @@ -73,7 +73,7 @@ add_task(async function test_more_than_keyword() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://mozilla.org"), + title: UrlbarTestUtils.trimURL("http://mozilla.org"), heuristic: true, }), makeBookmarkResult(context, { @@ -103,7 +103,7 @@ add_task(async function test_less_than_keyword() { matches: [ makeVisitResult(context, { uri: "http://mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://mozilla.org"), + title: UrlbarTestUtils.trimURL("http://mozilla.org"), heuristic: true, }), makeBookmarkResult(context, { diff --git a/browser/components/urlbar/tests/unit/test_match_javascript.js b/browser/components/urlbar/tests/unit/test_match_javascript.js @@ -117,7 +117,7 @@ add_task(async function test_javascript_match() { matches: [ makeVisitResult(context, { uri: "javascript: a", - fallbackTitle: "javascript: a", + title: "javascript: a", source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -140,7 +140,7 @@ add_task(async function test_javascript_match() { matches: [ makeVisitResult(context, { uri: "javascript: 5", - fallbackTitle: "javascript: 5", + title: "javascript: 5", source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), diff --git a/browser/components/urlbar/tests/unit/test_protocol_swap.js b/browser/components/urlbar/tests/unit/test_protocol_swap.js @@ -82,7 +82,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -98,7 +98,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -116,7 +116,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -132,7 +132,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -181,7 +181,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -199,7 +199,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -228,7 +228,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -245,7 +245,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -274,7 +274,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), @@ -291,7 +291,7 @@ add_task(async function test_swap_protocol() { matches: [ makeVisitResult(context, { uri: `${searchString}/`, - fallbackTitle: `${searchString}/`, + title: `${searchString}/`, source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, }), diff --git a/browser/components/urlbar/tests/unit/test_providerHeuristicFallback.js b/browser/components/urlbar/tests/unit/test_providerHeuristicFallback.js @@ -40,7 +40,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), makeSearchResult(context, { @@ -58,7 +58,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), makeSearchResult(context, { @@ -76,7 +76,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), makeSearchResult(context, { @@ -94,7 +94,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -109,7 +109,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -124,7 +124,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -156,7 +156,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: query, - fallbackTitle: query, + title: query, heuristic: true, }), ], @@ -171,7 +171,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -195,7 +195,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}`, - fallbackTitle: `${query}`, + title: `${query}`, iconUri: "page-icon:http://mozilla.org/", heuristic: true, }), @@ -244,7 +244,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), makeSearchResult(context, { @@ -262,7 +262,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}`, - fallbackTitle: `${query}`, + title: `${query}`, iconUri: "page-icon:http://firefox/", heuristic: true, }), @@ -282,7 +282,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}`, - fallbackTitle: `${query}`, + title: `${query}`, iconUri: "page-icon:http://mozilla/", heuristic: true, }), @@ -299,7 +299,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -314,7 +314,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -335,7 +335,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -350,7 +350,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: query, - fallbackTitle: query, + title: query, heuristic: true, }), ], @@ -440,7 +440,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -455,7 +455,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -470,7 +470,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -516,7 +516,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: query, - fallbackTitle: query, + title: query, heuristic: true, }), ], @@ -531,7 +531,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: query, - fallbackTitle: query, + title: query, heuristic: true, }), ], @@ -682,7 +682,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), makeSearchResult(context, { @@ -718,7 +718,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://user:pass@not-host/", - fallbackTitle: "user:pass@not-host/", + title: "user:pass@not-host/", heuristic: true, }), ], @@ -733,7 +733,7 @@ add_task(async function () { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://user@192.168.0.1/", - fallbackTitle: "user@192.168.0.1/", + title: "user@192.168.0.1/", heuristic: true, }), makeSearchResult(context, { @@ -792,7 +792,7 @@ add_task(async function dont_fixup_urls_with_at_symbol() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://Lorem%20Ipsum%20@mozilla.org/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -805,7 +805,7 @@ add_task(async function dont_fixup_urls_with_at_symbol() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `https://Lorem%20Ipsum%20@mozilla.org/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), ], @@ -819,7 +819,7 @@ add_task(async function dont_fixup_urls_with_at_symbol() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${query}/`, - fallbackTitle: `${query}/`, + title: `${query}/`, heuristic: true, }), makeSearchResult(context, { diff --git a/browser/components/urlbar/tests/unit/test_providerHistoryUrlHeuristic.js b/browser/components/urlbar/tests/unit/test_providerHistoryUrlHeuristic.js @@ -182,7 +182,7 @@ add_task(async function test_null_title() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "https://example.com/", - fallbackTitle: "https://example.com/", + title: "https://example.com/", iconUri: "page-icon:https://example.com/", heuristic: true, providerName: "UrlbarProviderHeuristicFallback", @@ -208,7 +208,7 @@ add_task(async function test_over_max_length_text() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri, - fallbackTitle: uri, + title: uri, iconUri: "page-icon:https://example.com/", heuristic: true, providerName: "UrlbarProviderHeuristicFallback", @@ -232,7 +232,7 @@ add_task(async function test_unsupported_protocol() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "about:robots", - fallbackTitle: "about:robots", + title: "about:robots", heuristic: true, providerName: "UrlbarProviderHeuristicFallback", }), diff --git a/browser/components/urlbar/tests/unit/test_providerKeywords.js b/browser/components/urlbar/tests/unit/test_providerKeywords.js @@ -247,7 +247,7 @@ add_task(async function test_keyword_search() { matches: [ makeKeywordSearchResult(context, { uri: "http://def/?search=", - fallbackTitle: "http://def/?search=", + title: "http://def/?search=", keyword: "key2", iconUri: "page-icon:http://def/?search=%s", heuristic: true, @@ -266,7 +266,7 @@ add_task(async function test_keyword_search() { matches: [ makeKeywordSearchResult(context, { uri: "http://def/?search=", - fallbackTitle: "http://def/?search=", + title: "http://def/?search=", keyword: "key2", iconUri: "page-icon:http://def/?search=%s", heuristic: true, @@ -392,7 +392,7 @@ add_task(async function test_keyword_search() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://key2/", - fallbackTitle: "http://key2/", + title: "http://key2/", heuristic: true, providerName: "UrlbarProviderHeuristicFallback", }), diff --git a/browser/components/urlbar/tests/unit/test_query_url.js b/browser/components/urlbar/tests/unit/test_query_url.js @@ -20,7 +20,7 @@ add_task(async function test_no_slash() { matches: [ makeVisitResult(context, { uri: "http://file.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://file.org/"), + title: UrlbarTestUtils.trimURL("http://file.org/"), heuristic: true, }), makeVisitResult(context, { @@ -56,7 +56,7 @@ add_task(async function test_w_slash() { matches: [ makeVisitResult(context, { uri: "http://file.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://file.org/", { + title: UrlbarTestUtils.trimURL("http://file.org/", { removeSingleTrailingSlash: false, }), heuristic: true, diff --git a/browser/components/urlbar/tests/unit/test_search_suggestions.js b/browser/components/urlbar/tests/unit/test_search_suggestions.js @@ -896,7 +896,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${SEARCH_STRING}/`, - fallbackTitle: `${SEARCH_STRING}/`, + title: `${SEARCH_STRING}/`, iconUri: "", heuristic: true, }), @@ -941,7 +941,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: `http://${SEARCH_STRING}/`, - fallbackTitle: `${SEARCH_STRING}/`, + title: `${SEARCH_STRING}/`, iconUri: "", heuristic: true, }), @@ -960,7 +960,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://somethingelse/", - fallbackTitle: "somethingelse/", + title: "somethingelse/", iconUri: "", heuristic: true, }), @@ -995,7 +995,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://1.2.3.4/", - fallbackTitle: "http://1.2.3.4/", + title: "http://1.2.3.4/", iconUri: "page-icon:http://1.2.3.4/", heuristic: true, }), @@ -1009,7 +1009,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://[2001::1]:30/", - fallbackTitle: "[2001::1]:30/", + title: "[2001::1]:30/", iconUri: "", heuristic: true, }), @@ -1023,7 +1023,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://user:pass@test/", - fallbackTitle: "user:pass@test/", + title: "user:pass@test/", iconUri: "", heuristic: true, }), @@ -1037,7 +1037,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://user:pass@mozilla.org/", - fallbackTitle: "user:pass@mozilla.org/", + title: "user:pass@mozilla.org/", iconUri: "", heuristic: true, }), @@ -1051,7 +1051,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://mozilla.org:1234/", - fallbackTitle: "mozilla.org:1234/", + title: "mozilla.org:1234/", iconUri: "", heuristic: true, }), @@ -1065,7 +1065,7 @@ add_task(async function prohibit_suggestions() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "data:text/plain,Content", - fallbackTitle: "data:text/plain,Content", + title: "data:text/plain,Content", iconUri: "", heuristic: true, }), @@ -1107,7 +1107,7 @@ add_task(async function simple_origin_queries() { let expected = [ makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, - fallbackTitle: `${query}/`, + title: `${query}/`, uri: `http://${query}/`, iconUri: "", heuristic: true, @@ -1430,7 +1430,7 @@ add_task(async function avoid_remote_url_suggestions_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "ftp://test/", - fallbackTitle: "ftp://test/", + title: "ftp://test/", iconUri: "", heuristic: true, }), @@ -1488,7 +1488,7 @@ add_task(async function avoid_remote_url_suggestions_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://www/", - fallbackTitle: "http://www/", + title: "http://www/", iconUri: "", heuristic: true, }), @@ -1502,7 +1502,7 @@ add_task(async function avoid_remote_url_suggestions_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "https://www/", - fallbackTitle: "https://www/", + title: "https://www/", iconUri: "", heuristic: true, }), @@ -1516,7 +1516,7 @@ add_task(async function avoid_remote_url_suggestions_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://test/", - fallbackTitle: "http://test/", + title: "http://test/", iconUri: "", heuristic: true, }), @@ -1530,7 +1530,7 @@ add_task(async function avoid_remote_url_suggestions_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "https://test/", - fallbackTitle: "https://test/", + title: "https://test/", iconUri: "", heuristic: true, }), @@ -1544,7 +1544,7 @@ add_task(async function avoid_remote_url_suggestions_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://www.test/", - fallbackTitle: "http://www.test/", + title: "http://www.test/", iconUri: "", heuristic: true, }), @@ -1558,7 +1558,7 @@ add_task(async function avoid_remote_url_suggestions_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "http://www.test.com/", - fallbackTitle: "http://www.test.com/", + title: "http://www.test.com/", iconUri: "", heuristic: true, }), @@ -1602,7 +1602,7 @@ add_task(async function avoid_remote_url_suggestions_2() { makeVisitResult(context, { source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, uri: "file:///Users", - fallbackTitle: "file:///Users", + title: "file:///Users", iconUri: "", heuristic: true, }), diff --git a/browser/components/urlbar/tests/unit/test_trimming.js b/browser/components/urlbar/tests/unit/test_trimming.js @@ -24,7 +24,7 @@ add_task(async function test_untrimmed_secure_www() { matches: [ makeVisitResult(context, { uri: "https://www.mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("https://www.mozilla.org"), + title: UrlbarTestUtils.trimURL("https://www.mozilla.org"), heuristic: true, }), makeVisitResult(context, { @@ -70,7 +70,7 @@ add_task(async function test_untrimmed_secure() { matches: [ makeVisitResult(context, { uri: "https://mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("https://mozilla.org"), + title: UrlbarTestUtils.trimURL("https://mozilla.org"), heuristic: true, }), makeVisitResult(context, { @@ -116,7 +116,7 @@ add_task(async function test_untrimmed_www() { matches: [ makeVisitResult(context, { uri: "http://www.mozilla.org/", - fallbackTitle: UrlbarTestUtils.trimURL("http://www.mozilla.org"), + title: UrlbarTestUtils.trimURL("http://www.mozilla.org"), heuristic: true, }), makeVisitResult(context, { diff --git a/browser/components/urlbar/tests/unit/test_word_boundary_search.js b/browser/components/urlbar/tests/unit/test_word_boundary_search.js @@ -206,7 +206,7 @@ add_task(async function test_escape() { }) : makeVisitResult(context, { uri: "file:///", - fallbackTitle: "file:///", + title: "file:///", source: UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL, heuristic: true, });