Skip to content

Commit

Permalink
Bug 1868922: Pass user's query as is to Rust component to keep string…
Browse files Browse the repository at this point in the history
… cases r=adw

Differential Revision: https://phabricator.services.mozilla.com/D198513

UltraBlame original commit: 0253ebfe13cce5635229aee23e86f203caced14b
  • Loading branch information
marco-c committed Jan 19, 2024
1 parent 261f844 commit b71b330
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 22 deletions.
8 changes: 0 additions & 8 deletions browser/components/urlbar/private/SuggestBackendRust.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,14 +1005,6 @@ return
]
;
}
searchString
=
searchString
.
toLocaleLowerCase
(
)
;
/
/
Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ search
?
find_desc
=
ramen
RaMeN
&
find_loc
=
tokyo
tOkYo
"
)
;
Expand All @@ -265,9 +265,9 @@ payload
.
title
"
ramen
in
tokyo
RaMeN
iN
tOkYo
"
)
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,41 @@ false
}
)
}
{
input
:
"
FoUrTh
"
expected
:
makeExpectedResult
(
{
suggestion
:
REMOTE_SETTINGS_RESULTS
[
0
]
.
attachment
[
3
]
source
:
"
remote
-
settings
"
setUtmParams
:
false
}
)
}
]
;
UrlbarPrefs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,51 @@ sponsored
}
)
;
add_task
(
async
function
mixedCaseQuery
(
)
{
await
check_results
(
{
context
:
createContext
(
"
TeSt
"
{
providers
:
[
UrlbarProviderQuickSuggest
.
name
]
isPrivate
:
false
}
)
matches
:
[
makeExpectedResult
(
)
]
}
)
;
}
)
;
function
makeExpectedResult
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,75 @@ forceSync
}
)
;
add_task
(
async
function
mixedCaseQuery
(
)
{
const
suggestion
=
REMOTE_SETTINGS_DATA
[
0
]
.
attachment
[
1
]
;
const
keyword
=
"
InPuT
"
;
await
check_results
(
{
context
:
createContext
(
keyword
{
providers
:
[
UrlbarProviderQuickSuggest
.
name
]
isPrivate
:
false
}
)
matches
:
[
makeExpectedResult
(
{
searchString
:
keyword
suggestion
}
)
]
}
)
;
}
)
;
function
makeExpectedResult
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,24 +240,24 @@ search
?
find_desc
=
best
BeSt
+
ramen
RaMeN
+
delivery
dElIvErY
&
find_loc
=
tokyo
tOkYo
"
title
:
"
best
ramen
delivery
in
tokyo
BeSt
RaMeN
dElIvErY
iN
tOkYo
"
}
}
Expand Down

0 comments on commit b71b330

Please sign in to comment.