Closed Bug 890163 Opened 11 years ago Closed 11 years ago

URL bar autocomplete misbehaves for file and ftp URIs

Categories

(Toolkit :: Places, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25
Tracking Status
firefox25 + fixed

People

(Reporter: bzbarsky, Assigned: mak)

References

Details

(Keywords: regression)

Attachments

(1 file)

STEPS TO REPRODUCE:

1)  Make sure /tmp/test.html exists
2)  Start browser with new profile
3)  Type "file:///tmp/test.html" into the URL bar and hit enter
4)  Hit Cmd-L
5)  Type "file"

EXPECTED RESULTS:  URL bar shows "file"

ACTUAL RESULTS: URL bar shows "file//" with the caret right after the 'e'

Regression range on m-c nightlies: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=3b955f306226&tochange=8e3a124c9c1a

Marco, could bug 791776 have caused this?
Flags: needinfo?(mak77)
I can reproduce the problem, it's possible the async behavior is causing this strange behavior, I will try to debug it and see.
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Flags: needinfo?(mak77)
Can reproduce also with ftp
Summary: URL bar autocomplete misbehaves for file URIs → URL bar autocomplete misbehaves for file and ftp URIs
I think I figured the patch introduced a difference in the code behavior, that was not intended. I will make a patch and a test for it.
Attached patch patch v1.0Splinter Review
In the async patch I misinterpreted the code behavior, so while cleaning up a bit the code I ended up changing a condition that was untested :(
The original behavior was that if the search string does not contain a slash, then we just search for hosts, otherwise, if the slash is not the last char, we query for a url.
I mischanged it so that if we don't find a matching host we try to match on the url. This was not intended and as such should be reverted. The patch restores the original behavior, and adds a test that would catch this.
Attachment #772297 - Flags: review?(mano)
Flags: in-testsuite?
OS: Mac OS X → All
Hardware: x86 → All
Attachment #772297 - Flags: review?(mano) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/6bfb7976d549
Flags: in-testsuite? → in-testsuite+
Target Milestone: --- → mozilla25
https://hg.mozilla.org/mozilla-central/rev/6bfb7976d549
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: