зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1633924: Make searching for input history to be case-insensitive. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D144779
This commit is contained in:
Родитель
debee8691e
Коммит
a217fbe3f8
|
@ -56,7 +56,7 @@ const SQL_ADAPTIVE_QUERY = `/* do not warn (bug 487789) */
|
|||
SELECT ROUND(MAX(use_count) * (1 + (input = :search_string)), 1) AS rank,
|
||||
place_id
|
||||
FROM moz_inputhistory
|
||||
WHERE input BETWEEN :search_string AND :search_string || X'FFFF'
|
||||
WHERE input COLLATE NOCASE BETWEEN :search_string AND :search_string || X'FFFF'
|
||||
GROUP BY place_id
|
||||
) AS i
|
||||
JOIN moz_places h ON h.id = i.place_id
|
||||
|
|
|
@ -470,6 +470,23 @@ add_task(async function test_adaptive_searchmode() {
|
|||
await Services.search.removeEngine(suggestionsEngine);
|
||||
});
|
||||
|
||||
add_task(async function test_ignore_case() {
|
||||
const url = "http://example.com/";
|
||||
await PlacesUtils.history.clear();
|
||||
await PlacesTestUtils.addVisits([url]);
|
||||
await UrlbarUtils.addToInputHistory(url, "SampLE");
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window: win,
|
||||
value: "sAM",
|
||||
});
|
||||
const result = await UrlbarTestUtils.getDetailsOfResultAt(win, 1);
|
||||
Assert.equal(
|
||||
result.url,
|
||||
url,
|
||||
"Seaching for input history is case-insensitive"
|
||||
);
|
||||
});
|
||||
|
||||
add_task(async function test_adaptive_history_in_privatewindow() {
|
||||
info(
|
||||
"Check adaptive history is not shown in private window as tab switching candidate."
|
||||
|
|
Загрузка…
Ссылка в новой задаче