SearchEngine.getResultDomain's responseType parameter is never used and the function needs renaming
Categories
(Firefox :: Search, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox113 | --- | fixed |
People
(Reporter: standard8, Assigned: tiwari.abhishektiwari23, Mentored)
Details
(Whiteboard: [lang=js])
Attachments
(1 file, 1 obsolete file)
SearchEngine.getResultDomain takes a responseType parameter, however, that is never used except for in a test specific for testing getResultDomain.
I don't see us needing it, so I think we should drop it and replace it with a simple getter.
I think we should also rename it to searchUrlDomain.
I'm happy to mentor this, but please note this is not a good first bug, but might be a better second or later bug. You'll also need a full build, otherwise you won't be able to test it properly.
The steps here would be approximately:
- In nsISearchService.idl, replace the getResultDomain line with
readonly attribute AString searchUrlDomain. Update the documentation next to it. - In SearchEngine.sys.mjs, change the function signature to
get searchUrlDomain(), and simplify the use of the fallback to passlazy.SearchUtils.URL_TYPE.SEARCHdirectly to_getURLOfType - Update all the existing instances to change from
getResultDomain()tosearchUrlDomain(note: drop the brackets, as it is now a getter. toolkit/components/search/tests/xpcshell/test_resultDomain.jswill need simplifying, and could have the name updated.- Check the main search tests pass, fix failures if not.
./mach xpcshell-test toolkit/components/search/
- Also check ESLint passes (this may take a few minutes to run):
./mach eslint toolkit/components/search/ browser/components/urlbar/
| Assignee | ||
Comment 1•2 years ago
|
||
I am giving it a try
| Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 3•2 years ago
|
||
Depends on D172293
| Assignee | ||
Comment 4•2 years ago
|
||
Sir, Please have a look at the changes that I made, I am successful in making a commit, but it is still failing the test, please guide me. Thanks
Updated•2 years ago
|
Updated•2 years ago
|
Hey! I can see there is no activity on this bug for two weeks. I am interested in solving this bug. Can I take it now? Otherwise, if there are any open bugs that need attention, I would be happy to take a look and see if I can help.
| Assignee | ||
Comment 6•2 years ago
|
||
I apologise for the delay. The delay happened because of my exam ( mentioned in another bug ). Around four bugs are pending, and I have almost completed this bug and will try to finish the rest task before the contribution deadline.
Comment 8•2 years ago
|
||
| bugherder | ||
Description
•