Closed Bug 1734765 Opened 3 years ago Closed 3 years ago

Move quick suggest test helpers into QuickSuggestTestUtils.jsm

Categories

(Firefox :: Address Bar, enhancement, P2)

enhancement
Points:
3

Tracking

()

RESOLVED FIXED
95 Branch
Iteration:
95.1 - Oct 4 - Oct 17
Tracking Status
firefox94 + fixed
firefox95 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

Let's consolidate and move quick suggest test helpers into QuickSuggestTestUtils.jsm. I'm working on https://mozilla-hub.atlassian.net/browse/SNT-34 and I'm adding a couple of test files that need many of the same helpers in head.js and browser_urlbar_telemetry_quicksuggest.js.

This consolidates and moves quick suggest test helpers into a new
QuickSuggestTestUtils.jsm. I'm working on
https://mozilla-hub.atlassian.net/browse/SNT-34 and I'm adding a couple of test
files that need many of the same helpers in
browser_urlbar_telemetry_quicksuggest.js. We already have some quick suggest
helpers in head.js, but instead of adding more, I think it would be useful to
have a new module analogous to UrlbarTestUtils.

This is mostly a straight port of those helpers to the new module, but some
changes were necessary so that the module doesn't make unnecessary assumptions
that the helpers in browser_urlbar_telemetry_quicksuggest.js made. That means I
added more params to some of these functions.

I also improved some of them a little bit where I noticed some small
improvements could be made and improved some function names.

Finally, I also removed UrlbarProviderQuickSuggest._helpUrl while I was here.
I added that property specifically so tests could override the help URL to avoid
accessing a remote URL, but at the time I didn't realize that
Services.urlFormatter.formatURLPref("app.support.baseURL") returns a local URL
when running tests.

Blocks: 1734961
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/75507ac63638
Move quick suggest test helpers into QuickSuggestTestUtils.jsm. r=mak
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Flags: qe-verify-
Flags: in-testsuite+

[Tracking Requested - why for this release]: We need this for the Firefox Suggest preferences redesign targeting 95/94.

Comment on attachment 9244909 [details]
Bug 1734765 - Move quick suggest test helpers into QuickSuggestTestUtils.jsm.

Beta/Release Uplift Approval Request

  • User impact if declined: We need this for the Firefox Suggest preferences redesign targeting 95/94.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: Please see uplift spreadsheet: https://docs.google.com/spreadsheets/d/1LavihS-VOPFYEyum7mrx6FKXmuQeHi9xQHfGNSxjnoY/edit?usp=sharing
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a tests-only change that refactors some test code.
  • String changes made/needed:
Attachment #9244909 - Flags: approval-mozilla-release?

Comment on attachment 9244909 [details]
Bug 1734765 - Move quick suggest test helpers into QuickSuggestTestUtils.jsm.

Approved for 94.0.2.

Attachment #9244909 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: