Await a dynamic result's pending view update via waitForAutocompleteResultAt
Categories
(Firefox :: Address Bar, task)
Tracking
()
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.
Updated•8 days ago
|
| Assignee | ||
Comment 1•8 days ago
|
||
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.
Updated•8 days ago
|
Updated•2 days ago
|
Updated•10 hours ago
|
| Assignee | ||
Updated•10 hours ago
|
Description
•