Closed Bug 1832927 Opened 1 year ago Closed 1 year ago

Move sponsored/nonsponsored checks back to UrlbarProviderQuickSuggest

Categories

(Firefox :: Address Bar, defect, P1)

defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox114 --- unaffected
firefox115 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

In the review for bug 1828610 I suggested moving the suggest.quicksuggest.sponsored and suggest.quicksuggest.nonsponsored checks from UrlbarProviderQuickSuggest._canAddSuggestion() to AdmWikipedia.makeResult(), but that was a mistake. I was thinking those prefs apply only to adM/Wikipedia suggestions, but that's not true because they correspond to the sponsored/nonsponsored toggles in about:preferences, which apply to all Suggest results, including navigational suggestions, addons, etc.

I realized this when making the uplift patch for bug 1832300. With the deconflicted patch applied, test_quicksuggest_topPicks.js fails on 114 because the test doesn't set suggest.quicksuggest.nonsponsored to true. The same test passes on 115 even without setting the pref because bug 1828610 is on 115, so the pref is incorrectly not necessary.

Please see bug 1832927 for background. This fixes the problem on 115 by moving
the sponsored/nonsponsored logic back to the provider.

I added a task to test_quicksuggest_topPicks.js, and I created xpcshell tests
for addons and dynamic Wikipedia with similar tasks. It would be nice to unify
this check for all quick suggest types somehow -- maybe a task in
test_quicksuggest.js, but that's not quite as simple as it seems because each
suggestion type has its own suggestion object and expected result payload. We
might also want to add more tasks to these new files. We can think about that
later because there are other opportunities for test consolidation too.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e140e00d981 Move sponsored/nonsponsored checks back to UrlbarProviderQuickSuggest. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Flags: qe-verify+
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: