Closed Bug 2068470 Opened 25 days ago Closed 24 days ago

Test urlbar engagement and abandonment telemetry for the New Tab search bar

Categories

(Firefox :: Address Bar, task)

task

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: dao, Assigned: dao)

References

Details

(Whiteboard: [sng][mcab-hnt])

Attachments

(4 files)

Nothing asserts the urlbar.engagement or urlbar.abandonment metrics for the New Tab search bar. newtab_searchbar is a documented sap value in browser/components/urlbar/metrics.yaml and UrlbarParentController carries the branch that produces it, but the sap matrix in browser/components/urlbar/tests/browser-engagementTelemetry/ covers urlbar, urlbar_newtab, searchbar, handoff and urlbar_addonpage only.

browser/components/urlbar/tests/browser-newtab/browser_searchTelemetry.js does not overlap. It asserts newtabSearch.issued, the SAP counters and the SERP ad metrics, and touches no urlbar.* metric.

Worth asserting:

  • sap on engagement and abandonment.
  • abandonment_type. The bar lives in the page, so a tab switch or a navigation destroys it where the address bar survives, and blur resolves differently from tab_switch.
  • groups, results and n_results. newtab_searchbar has its own provider set - no Places, InputHistory, RemoteTabs, TopSites or TabToSearch - so its result composition matches neither urlbar nor searchbar, and its result-groups branch in UrlbarPrefs is marked in-tree as a placeholder.
  • urlbar.disable. The bar carries UrlbarProviderQuickSuggest, so unlike searchbar and handoff it can record one.
  • urlbar.bounce, for a bar hosted in the page the user navigates away from and back to.

The tests belong in browser/components/urlbar/tests/browser-newtab/, which already has NewtabSearchbarTestUtils wired and loads the same head-common.js; only the assertGleanTelemetry helpers need lifting. A mirror of doHandoffTest() in browser-engagementTelemetry/ is not the shape: that helper turns the New Tab search bar off and drives gURLBar, so every drive verb there (openPopup, doBlur, doEnter, doClick, doTest) would need a browser-taking parallel.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED

Reading the details of a search result threw "Something tried to use the search service before it finished initializing", since the content-side utils resolved the url themselves.

The bar records no urlbar.bounce (bug 2068488), so browser_bounceTelemetry.js asserts that absence with the address bar in the same page as its control.

Attachment #9635225 - Attachment description: Bug 2068470 - Test the New Tab search bar's engagement, abandonment, disable and bounce telemetry. r?daleharvey! → Bug 2068470 - Test the New Tab search bar's engagement, abandonment, disable and bounce telemetry. r?mbeier!
Attachment #9635225 - Attachment description: Bug 2068470 - Test the New Tab search bar's engagement, abandonment, disable and bounce telemetry. r?mbeier! → Bug 2068470 - Test the New Tab search bar's engagement, abandonment, disable and bounce telemetry. r?daleharvey!

tab_switch reads as "the user switched tabs", but the address bar records it only for a session it keeps focus through; a switch that takes focus out of the input records blur, and so does the New Tab search bar's, which goes into the background with its page.

Attachment #9635309 - Attachment description: Bug 2068470 - Say what the urlbar.abandonment `tab_switch` type actually records. r?mbeier! → Bug 2068470 - Say what the urlbar.abandonment `tab_switch` type actually records. r?mbeier! DONTBUILD
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/35a34aa027bf https://hg.mozilla.org/integration/autoland/rev/8d872380da6a Move the urlbar Glean telemetry assertion helpers to the shared test head. r=mbeier,urlbar-reviewers https://github.com/mozilla-firefox/firefox/commit/96c52853df95 https://hg.mozilla.org/integration/autoland/rev/d10d1bdec2e5 Resolve a New Tab search bar result's url parent-side in NewtabSearchbarTestUtils. r=mbeier,urlbar-reviewers https://github.com/mozilla-firefox/firefox/commit/302b1ef01625 https://hg.mozilla.org/integration/autoland/rev/a5a9d8186da1 Test the New Tab search bar's engagement, abandonment, disable and bounce telemetry. r=mbeier
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9f48a7c5d808 https://hg.mozilla.org/integration/autoland/rev/4e9c6db9c34a Say what the urlbar.abandonment `tab_switch` type actually records. r=mbeier,urlbar-reviewers DONTBUILD
QA Whiteboard: [search][qa-triage-done-c157/b156]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: