Change unit test callers for nsISearchService.addEngineWithDetails to use object passing rather than individual parameters
Categories
(Firefox :: Search, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: standard8, Assigned: melvingeorge10, Mentored)
References
Details
(Whiteboard: [good first bug][lang=js])
Attachments
(1 file, 1 obsolete file)
nsISearchService.addEngineWithDetails currently supports two formats of parameters:
Services.search.addEngineWithDetails(name, iconURL, alias, description, method, template, extensionID);
or
Services.search.addEngineWithDetails(name, details);
We want to migrate to using just the name, details
form. To start off with, lets do just the unit tests, here's a link to the current places this affects:
Reporter | ||
Comment 1•5 years ago
|
||
I'm opening this up as mentored. To help Mozilla out with this bug, here's the steps:
- Comment here on the bug that you want to volunteer to help. I (or someone else) will assign it to you.
- Download and build the Firefox source code: https://developer.mozilla.org/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build (an artifact build is sufficient).
- If you have any problems, please ask on IRC (https://wiki.mozilla.org/Irc) in the #introduction channel. They're there to help you get started.
You can also read the Developer Guide, which has answers to most development questions: https://developer.mozilla.org/docs/Mozilla/Developer_guide/Introduction
- If you have any problems, please ask on IRC (https://wiki.mozilla.org/Irc) in the #introduction channel. They're there to help you get started.
- Start working on this bug.
- See the link in comment 0 for the places to change. We want to change calls such as
await Services.search.addEngineWithDetails("MozSearch", "", "mozalias", "", "GET",
"http://example.com/?q={searchTerms}");
to
await Services.search.addEngineWithDetails("MozSearch", {
alias: "mozalias",
method: "GET",
template: "http://example.com/?q={searchTerms}",
});
* Note: you'll need to use different properties in the object depending on what the original call was. See the [documentation here](https://searchfox.org/mozilla-central/rev/6c9f60f8cc064a1005cd8141ecd526578ae9da7a/toolkit/components/search/nsISearchService.idl#298-360) for the possible parameter names.
* If a parameter is "" or null, then it doesn't need specifying in the object.
* If you have direct questions about this bug, feel free to ask here or on irc.
- Check your changes for adherence to our guidelines by using:
./mach lint --workdir
- (this checks the uncommited changes in your work directory)
- Build your change with mach build and test your change with:
./mach test toolkit/components/search
- You can also name the other directories where there are files that you're changing, but we'll also run these against our test servers once a patch has been posted to make sure nothing has broken.
- Submit the patch for review. Mark me as a reviewer (r?standard8) so I'll get an email to come look at your code.
- Here's the guide.
- I strongly suggest using moz_phab to push the patch.
- After a series of reviews and changes to your patch, I'll mark it for checkin or push it to autoland. Your code will soon be shipping to Firefox users worldwide!
- ...now you get to think about what kind of bug you'd like to work on next. Let me know what you're interested in and I can help you find your next contribution.
Assignee | ||
Comment 2•5 years ago
|
||
I would like to work on this issue.
Reporter | ||
Comment 3•5 years ago
|
||
Welcome, please start working on it, and let us know if you get any issues.
Assignee | ||
Comment 4•5 years ago
|
||
can you please point out the repository i need to start working on.
Reporter | ||
Comment 5•5 years ago
|
||
(In reply to melvingeorge10 from comment #4)
can you please point out the repository i need to start working on.
If you follow the link in step 1 (i.e. https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build), pick the platform that you're starting on.
Then near the top of the page, it'll tell you what you need to do to get set up, and what commands you need to run to clone the repository (Generally in a "Get the source"/"Get the code" section).
Assignee | ||
Comment 6•5 years ago
|
||
i need only mozilla-central repo.. but the script downloads mozilla-unified repo
Reporter | ||
Comment 7•5 years ago
|
||
Unified is a superset of mozilla-central, so it doesn't matter except it is larger. If you want just mozilla-central, then use:
hg clone https://hg.mozilla.org/mozilla-central
Assignee | ||
Comment 8•5 years ago
|
||
ok
Assignee | ||
Comment 9•5 years ago
|
||
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D32565
Assignee | ||
Comment 11•5 years ago
|
||
Made all the changes to initial revision. ( D32565 - https://phabricator.services.mozilla.com/D32565 )
Updated•5 years ago
|
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/365c849f1085 Change tests using Services.search.addEngineWithDetails() to use the object parameter form. r=Standard8
Comment 13•5 years ago
|
||
bugherder |
Description
•