Closed Bug 1543960 Opened 6 years ago Closed 6 years ago

Update TestSearchCounts to retrieve search engine after performing a search

Categories

(Toolkit :: Telemetry, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: raphael, Assigned: raphael)

Details

Attachments

(1 file)

Currently this test retrieves the current search engine at test setUp and stores its identifier on the test case object. We later use this to verify the correctness of the keyed histogram data for search counts.

:daleharvey pointed out that the search service is loaded lazily and might not be fully initialized when we try to retrieve the current search engine. A patch landed to addressing this potential problem and calls init explicitly.

:gfritzsche suggested to retrieve the search engine after we've performed searches, which would render the call to init the service unnecessary.

I think that would make a great improvement for the tests, since we try to make no assumptions about the internal workings of Firefox in the tests.

Priority: -- → P3

Deferring the call to retrieve the default search engine without calling init explicitly doesn't seem to work. I'm getting this JavaScript Error: "Something tried to use the search service before it's been properly intialized."

What do you think, shall we close this bug as WONTFIX?

Flags: needinfo?(chutten)
Assignee: nobody → rpierzina
Status: NEW → ASSIGNED

Fine by me, though it might be worth dropping a code comment in the test explaining what you've learned.

Flags: needinfo?(chutten)
Pushed by rpierzina@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/501724287e52 Update doc string in telemetry-tests-client search test; r=chutten
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: