Open Bug 2049086 Opened 2 days ago Updated 1 day ago

[IPC Urlbar] Remove the test-only listener API from UrlbarParentController and update its unit tests

Categories

(Firefox :: Address Bar, task)

task

Tracking

()

ASSIGNED

People

(Reporter: dao, Assigned: dao)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

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

Attachments

(1 file)

In bug 2044950, listener dispatch moved to UrlbarChildController, which owns the listener set; UrlbarParentController delegates to it via setListenerHost(). The parent kept its own _listeners set and addListener/removeListener/notify only as a standalone fallback, used solely by xpcshell unit tests that construct a bare parent via UrlbarTestUtils.newMockController.

As mbeier noted in https://phabricator.services.mozilla.com/D304697#inline-1658130, there are only 4 such usages in unit tests (browser tests already go through UrlbarChildController::addListener), and some of them test the test-only UrlbarParentController::addListener path.

Update those unit tests so they no longer rely on the test-only listener API on UrlbarParentController, then remove the parent's standalone listener fallback (the _listeners set and the _listenerHost delegation in addListener/removeListener/notify), leaving listener registration and dispatch solely on UrlbarChildController.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Blocks: 2049112
No longer blocks: 2010269
Summary: Remove the test-only listener API from UrlbarParentController and update its unit tests → [IPC Urlbar] Remove the test-only listener API from UrlbarParentController and update its unit tests
Attachment #9599496 - Attachment description: Bug 2049086 - Remove the test-only listener API from UrlbarParentController and update its unit tests. r?mbeier → Bug 2049086 - [IPC Urlbar] Remove the test-only listener API from UrlbarParentController and update its unit tests. r?mbeier
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: