Closed Bug 1071481 Opened 11 years ago Closed 11 years ago

host of search engines is not autoFilled anymore if it's not the most frecent result

Categories

(Toolkit :: Places, defect)

defect
Not set
normal
Points:
3

Tracking

()

RESOLVED FIXED
mozilla35
Iteration:
35.2

People

(Reporter: mak, Assigned: mak)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Recent changes to the awesomebar have somehow regressed autoFill, I have google.com in my typed domains but it's not autoFilled anymore. Need to investigate which change caused this and a new test for it.
Blocks: 1071461
Points: --- → 3
Flags: in-testsuite?
Flags: firefox-backlog+
Marco, please add this to the current iteration.
Flags: needinfo?(mmucci)
Added to IT 35.2 (In reply to Marco Bonardo [::mak] (needinfo? me) from comment #1) > Marco, please add this to the current iteration.
Iteration: --- → 35.2
Flags: needinfo?(mmucci)
Flags: qe-verify?
Flags: qe-verify? → qe-verify+
QA Contact: andrei.vaida
The problem here is that when we match search engines, if we get a match we call addFrecencyMatch. This will add the match to a list but not yet to the result. Later, before a new match is being added, we compare its frecency with the entries in the frecencies list and if an entry with an higher frecency is found we add it to the result. This means at the time we call addFrecencyMatch we still don't know if that result will end up being the first or not, but we return hasFirstResult = true, that means we don't run any more heuristics for the first result (no host/url autofill). So basically: 1. I have typed google.com 2. I have google.com search engine I'd expect "go" to autofill at least one of these 2, but when I type "go" the search engine is at third post and the typed host is not even tried. The easy solution here is to drop support for frecency matches mixup for now, to proper support those we need to be able to insert matches in a result in random order, that will come with an autocomplete rewrite. There are actually also other issues we had even before the regression, like calling setDefaultIndex(0) even if then the entry won't be the first one. and the fact if it is not the first entry and the user tries to remove it, it will fail. now since the first entry will look special it is less surprising that removing it may fail, but not for the other entries. So yeah, I think we should make the code simpler for now and re-evaluate adding more complex behavior in future, when we have the right way to do it.
Blocks: 1065303
Summary: autoFill is not the first result anymore → host of search engines is not autoFilled anymore if it's not the most frecent result
Attached patch patch v1 (obsolete) — Splinter Review
This may be a little bit tricky to verify for QE, it requires having a result that matches the same string as the search engine host but with an higher frecency (like a google search repeated an hundred times). Since this has an automated test,if QE-verify ends up being tricky to complete, I'd just rely on the test.
Attachment #8494002 - Flags: review?(bmcbride)
(In reply to Marco Bonardo [::mak] (needinfo? me) from comment #4) > Since this has an automated test,if QE-verify ends up being tricky to > complete, I'd just rely on the test. Settings the flags accordingly, thanks (feel free to do that on such on assessment in the future right away).
Flags: qe-verify-
Flags: qe-verify+
Flags: in-testsuite?
Flags: in-testsuite+
Comment on attachment 8494002 [details] [diff] [review] patch v1 Review of attachment 8494002 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/places/UnifiedComplete.js @@ +70,1 @@ > const FRECENCY_SEARCHENGINES_DEFAULT = 1000; Maybe the const should be renamed? @@ +834,5 @@ > let match; > switch (queryType) { > case QUERYTYPE_AUTOFILL_HOST: > this._result.setDefaultIndex(0); > + // Fallback. ITYM "fall through" ::: toolkit/components/places/tests/unifiedcomplete/test_searchEngine.js @@ +23,5 @@ > > yield cleanup(); > }); > + > +add_task(function* test_searchEngine_autoFill() { Sorry, my turn to bitrot someone :) I renamed this file to test_searchEngine_restyle.js and added test_searchEngine_current.js - so you'll want to move this new test to a test_searchEngine_domain.js or something.
Attachment #8494002 - Flags: review?(bmcbride) → review+
(In reply to Blair McBride [:Unfocused] from comment #6) > > + // Fallback. > > ITYM "fall through" lol, not sure what I was thinking :)
Attached patch patch v2Splinter Review
fixed. waiting for bug 1067888 to reland.
Attachment #8494002 - Attachment is obsolete: true
Target Milestone: --- → mozilla35
Depends on: 1073846
Depends on: 1073848
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: