Closed Bug 1779680 Opened 2 years ago Closed 2 years ago

In adaptive history autofill, "www" can't be omitted when searching with a prefix

Categories

(Firefox :: Address Bar, defect, P1)

defect
Points:
3

Tracking

()

VERIFIED FIXED
104 Branch
Tracking Status
firefox103 --- wontfix
firefox104 --- verified

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

Cristian found this bug. If you create the following input history:

Then the URL is not autofilled when you type http://ex. I'm not sure if we regressed this with one of the recent changes or not, but test_autofill_adaptiveHistory.js doesn't contain a test for this case.

Please see the bug for details. We recently improved the handling of "www" and
prefixes for adaptive history autofill and made it more like origin autofill,
and this revision makes it even more like origin autofill. Origin autofill
computes a host_fixed value that is the matching host except it doesn't
contain "www" if the user didn't type it. This revision does something similar
for adaptive history autofill by computing url_fixed. This also allows
_processRow() to be a little simpler for the adaptive history case and it's
almost exactly the same as the origin case now.

I changed the :searchString param so that it's this._searchString instead of
queryContext.searchString. That's consistent with the two other autofill
queries and it made fixing this bug easier.

I also added some comments that should be helpful.

Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3f2fd9e5c357
Allow "www" to be omitted when searching with a prefix for adaptive history autofill. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch

Here are STR I'm using to verify this bug. The problem is that the actual Reddit URLs include "www" but the adaptive history record does not. When you visit a Reddit URL without www, Firefox is redirected to a URL with www.

Cristian, please feel free to use your own STR too.

  1. Set browser.urlbar.autoFill.adaptiveHistory.enabled to true
  2. Visit https://www.reddit.com/r/entertainment/comments/vzf5ip/gangnam_style_turns_10_billionviews_groundbreaker/ or any other Reddit page
  3. Open a new tab and close the previous one
  4. Type https://re and choose the history result from step 2
  5. Open a new tab and close the previous one
  6. Type https://re again and verify the full URL from step 2 autofills
  7. Press Enter and verify the URL correctly loads
  8. Open a new tab and close the previous one
  9. Type https://ww and choose the history result from step 2
  10. Open a new tab and close the previous one
  11. Type https://ww again and verify the full URL from step 2 autofills
  12. Press Enter and verify the URL correctly loads

Notes:

  • If you type http://re (not https) instead in steps 4 and 5, then the full URL will not be autofilled because the scheme part of the real URL (the https part) does not match the part in the adaptive history record (the http part). They must match to trigger adaptive history autofill.
Flags: qe-verify+
Flags: in-testsuite+
See Also: → 1770164

I was going to request uplift on this, but the patch has a non-trivial conflict on 103 due to the lazy-fication added in 104 by bug 1777486. It looks like 103 is done with betas and the next build is an RC, so it's late to be asking for uplift anyway. We're only planning on enabling adaptive history autofill for a relatively small user population through an experiment on 103, and given the low severity of this bug and the requirement to type a URL scheme/protocol, which most users probably won't do, I think we can live with it on 103.

Tested this using the latest nightly Fx104.0a1. The issue is verified fixed using the steps provided by Drew. In all the cases the autofill works correctly, and even tested a case that is using only http:// for autofill and it still works correctly.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: