Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

User input starting with http doesn't sort suggestion results properly #5578

Closed
bbondy opened this issue Nov 13, 2016 · 0 comments
Closed

User input starting with http doesn't sort suggestion results properly #5578

bbondy opened this issue Nov 13, 2016 · 0 comments

Comments

@bbondy
Copy link
Member

bbondy commented Nov 13, 2016

I noticed a test failure in urlbarSuggestions where URLs were being sorted out of order.
It turned out to be because the test was matching http://localhost... But starting with user input h, it would wrongly search inside the string and find a mach in localhost, but really the test (or user) is just trying to type an http prefix. To fix this I have a url normalization mode which is always entered unless the user starts with one of these:
h
ht
htt
http
http:
http:/
http://
https
https:
https:/
https://
w
ww
www
www.

Steps to reproduce for QA:

  1. cd test/fixtures
  2. python -m SimpleHTTPServer 8089
  3. load http://localhost:8089/page1.html
  4. load http://localhost:8089/page2.html
  5. new tab
  6. close first tab
  7. type ht notice (page2 gets priroritized)
  8. type htt notice (page1 gets prioritized?!?!)

The fix was on 8 so now it will keep page2 prioritized.

@bbondy bbondy added this to the 0.12.9dev milestone Nov 13, 2016
@bbondy bbondy closed this as completed in d4e272e Nov 13, 2016
@bbondy bbondy changed the title User input starting with http doesn't sort results properly User input starting with http doesn't sort suggestion results properly Nov 13, 2016
bbondy added a commit that referenced this issue Nov 14, 2016
Fix #5578

Auditors: @aekeus

Note there is 1 more test failure I'm working on with urlbarSuggestions but it isn't related to this
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants