Closed Bug 1600000 Opened 5 years ago Closed 5 years ago

Simplify functions to select a search engine list in search's xpcshell head.js

Categories

(Firefox :: Search, task, P2)

task
Points:
2

Tracking

()

RESOLVED FIXED
Firefox 72
Iteration:
72.3 - Nov 18 - Dec 1
Tracking Status
firefox72 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

Currently we have three functions in head.js that are doing very similar things:

https://searchfox.org/mozilla-central/rev/4df8821c1b824db5f40f381f48432f219d99ae36/toolkit/components/search/tests/xpcshell/head_search.js#75,92,204

  • configureToLoadJarEngines
  • useTestEngines
  • useTestEngineConfig

The first two are actually near-duplicates, configureToLoadJarEngines just has a hard-coded value rather that it being passed in.

In bug 1542269, I need to change how the engine loading works for the modern configuration, therefore I'd like to merge these all into one async function to make that work easier.

I'm doing the change to async here, as I know it'll need to be async, and it saves extra blame.

Note, I'm also tagging on removing an unused function from our browser mochitest's head.js.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2be31ae31be0
Remove unused promiseTabLoadEvent from search's mochitest head.js. r=mikedeboer
https://hg.mozilla.org/integration/autoland/rev/8d42aaa5b911
Simplify functions to select a search engine list in search's xpcshell head.js. r=mikedeboer
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: