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 0d367f5 commit a6ffea5
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 173 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 @@ -260,52 +260,6 @@ Yelp
"
)
;
/
/
TODO
:
After
fixing
bug
1868922
need
to
change
the
value
to
case
-
sensitive
.
/
/
This
value
should
be
"
https
:
/
/
www
.
yelp
.
com
/
search
?
find_desc
=
RaMeN
&
find_loc
=
tOkYo
"
.
Assert
.
equal
Expand All @@ -330,44 +284,14 @@ search
?
find_desc
=
ramen
RaMeN
&
find_loc
=
tokyo
tOkYo
"
)
;
/
/
TODO
:
After
fixing
bug
1868922
need
to
change
the
value
to
case
-
sensitive
.
/
/
This
value
should
be
"
RaMeN
iN
tOkYo
"
.
Assert
.
equal
Expand All @@ -378,9 +302,9 @@ payload
.
title
"
ramen
in
tokyo
RaMeN
iN
tOkYo
"
)
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2167,6 +2167,41 @@ false
}
)
}
{
input
:
"
FoUrTh
"
expected
:
makeExpectedResult
(
{
suggestion
:
REMOTE_SETTINGS_RESULTS
[
0
]
.
attachment
[
3
]
source
:
"
remote
-
settings
"
setUtmParams
:
false
}
)
}
]
;
/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,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 @@ -1086,6 +1086,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
Loading

0 comments on commit a6ffea5

Please sign in to comment.