Closed Bug 1572488 Opened 5 years ago Closed 5 years ago

Test that the new configuration still gives the correct orders in various circumstances

Categories

(Firefox :: Search, task, P2)

task
Points:
2

Tracking

()

RESOLVED FIXED
Firefox 71
Iteration:
71.1 - Sept 2 - 15
Tracking Status
firefox71 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Splitting this out from bug 1542243. I think we should add a few more tests for search engine orders, as I think there might be a bug lying around.

We should test things like (engine name -> order hint):

  • A -> 750
  • B -> 3000
  • C -> 2000 Default = yes
  • D -> 1000 Default = yes-if-no-other
  • E -> 500 Default = yes-if-no-other.

Currently, I think this would come out as C, D, E, B, A, whereas I think it should be C, B, D, A, E.

(we should do similar checks for private browsing engine as well).

Assignee: nobody → dharvey
Status: NEW → ASSIGNED
Priority: P2 → P1

Actually relooking probably best if you take this Mark. The engine selector does return C, D, E, B, A as that is what I would expect it to return.

Not sure why being a 'yes-if-no-other' engine wouldnt override the orderHint and thinking about the implementation it seems like it gets messy when handling multiple yes-if-no-others (same orderHint?), between having to handle default=yes|yes-if-no-other and private browsing this seemed like the simplest consistent solution that handled all cases (I would prefer the code be able to handle multiple default= yes / yes-if-no-others) but could be another way I am not thinking of

Assignee: dharvey → nobody
Status: ASSIGNED → NEW
Priority: P1 → P2
Assignee: nobody → standard8
Iteration: --- → 71.1 - Sept 2 - 15

(In reply to Mark Banner (:standard8) from comment #0)

  • A -> 750
  • B -> 3000
  • C -> 2000 Default = yes
  • D -> 1000 Default = yes-if-no-other
  • E -> 500 Default = yes-if-no-other.

Currently, I think this would come out as C, D, E, B, A, whereas I think it should be C, B, D, A, E.

To explain this. Order Hint goes from highest to lowest. So if you ignore the default, this would be B, C, D, A, E. However, here the default is C, so that needs to be shifted first, this gives us C, B, D, A, E.

The issue with "yes-if-no-other" causes these engines to be a higher order, partially ignoring the order hint. That feels a bit wrong if we're prioritising the order hint.

I have a test written now, I'll see what I can figure out for the code.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/45743b6fcc67
Improve handling of search engine ordering for the new SearchEngineSelector. r=daleharvey
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: