Open Bug 2052555 Opened 8 days ago Updated 10 hours ago

Await a dynamic result's pending view update via waitForAutocompleteResultAt

Categories

(Firefox :: Address Bar, task)

task

Tracking

()

ASSIGNED

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

A dynamic result's view update is applied asynchronously — UrlbarView awaits the provider's getViewUpdate() — so the updated DOM can land after the row is first shown. Tests that assert on the updated DOM can race that update (especially visible when the update round-trips over the urlbar actor message path).

Dispatch a DynamicResultUpdated event once the update is applied, add a UrlbarTestUtils.promiseDynamicResultUpdated helper, and have the affected tests (browser_dynamicResults.js) await it before asserting. Behavior-neutral for product code — the event is only observed by tests.

A dynamic result's view update is applied asynchronously (the view awaits
getViewUpdate), and on the message path that's an actor round-trip, so the
update can land well after the row is shown. Tests that assert on the updated
DOM raced it and failed only on the wire.

Dispatch a DynamicResultUpdated event once the update is applied, add a
UrlbarTestUtils.promiseDynamicResultUpdated helper, and have the highlighting
subtests await it before asserting.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Attachment #9604293 - Attachment description: Bug 2052555 - [IPC Urlbar] Phase 6: Fire an event when a dynamic result's view update lands. r?daleharvey,mbeier → Bug 2052555 - [IPC Urlbar] Phase 6: Fire an event when a dynamic result's view update lands. r?mbeier!
Attachment #9604293 - Attachment description: Bug 2052555 - [IPC Urlbar] Phase 6: Fire an event when a dynamic result's view update lands. r?mbeier! → Bug 2052555 - [IPC Urlbar] Phase 6: Await a dynamic result's pending view update via waitForAutocompleteResultAt. r?mbeier!
Summary: Dispatch a DynamicResultUpdated event so tests can await dynamic result view updates → Await a dynamic result's pending view update via waitForAutocompleteResultAt
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: