Fix problems with the autofill placeholder
Categories
(Firefox :: Address Bar, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | verified |
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #1773025 +++
Spinning this out from bug 1773025 to fix the flickering problem (problem 1 I called it) plus some other problems I found with the autofill placeholder.
Assignee | ||
Comment 1•2 years ago
|
||
This fixes some problems with the autofill placeholder and improves the test.
Not all the problems are related to adaptive history autofill. They are:
- When the first result arrives and it's not an autofill, the placeholder
should be cleared. This fixes the flickering I noted in bug 1773025. - When the placeholder is example.com/shallow/deep/ and a search for
example.com/s starts, the placeholder should not be autofilled. - When the placeholder was created due to adaptive history autofill and a new
search starts, we should use different logic from origin and URL autofill to
determine if the placeholder can be autofilled. We need to make sure the
placeholder starts with the search string and the search string is at least
as long as the adaptive historyinput
.
To fix problem 3, I changed _autofillPlaceholder
from a string to an object
that stores much of the same data that is in result.autofill
. This lets us
make smarter decisions about autofilling the placeholder.
I also refactored and renamed some functions so hopefully the code is easier to
understand.
Finally I mostly rewrote the placeholder test so it's also easier to understand,
and I added many test cases for the problems above. Since I'm modifying this
test anyway, I moved the adaptive history autofill placeholder tests from their
own file to the main test.
Assignee | ||
Comment 2•2 years ago
|
||
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b4f6fb035220 Fix problems with the autofill placeholder. r=daisuke
Comment 4•2 years ago
|
||
bugherder |
Assignee | ||
Comment 5•2 years ago
|
||
STR for QA
Case 1
- Visit https://www.nytimes.com/section/world
- Open a new tab and close the tab from the previous step
- Start typing "nytimes"
- With each character you type, verify "nytimes.com/" is autofilled in the input
- Move the caret to the end and start typing "section" so that the input will contain "nytimes.com/section"
- With each character you type, verify "nytimes.com/section/" is autofilled
- Move the caret to the end and start typing "world" so that the input will contain "nytimes.com/section/world"
- With each character you type, verify "nytimes.com/section/world" is autofilled
- Highlight "times.com/section/world" in the input. "ny" should not be highlighted, and everything after "ny" should be highlighted.
- Type a "t" character so that the input contains "nyt"
- Verify "nytimes.com/" is autofilled
Case 2
- Set
browser.urlbar.autoFill.adaptiveHistory.enabled
to true - Visit https://www.nytimes.com/section/world
- Open a new tab and close the tab from the previous step
- Type "nyti" and pick the https://www.nytimes.com/section/world result in the urlbar panel
- Open a new tab and close the tab from the previous step
- Type "nyt"
- With each character you type, verify "nytimes.com/" is autofilled
- Continue typing the rest of "nytimes.com/section/world"
- With each character you type, verify "nytimes.com/section/world" is autofilled and there is no flickering of the selection in the input
- Highlight "times.com/section/world" in the input. "ny" should not be highlighted, and everything after "ny" should be highlighted.
- Type a "t" character so that the input contains "nyt"
- Verify "nytimes.com/" is autofilled
Comment 6•2 years ago
|
||
The issue is verified fixed using the latest Fx103.0a1 build on Windows 10 and Ubuntu 20.04. Both scenarios were covered and the desired outcome is reached in both cases.
Description
•