Closed Bug 1121691 Opened 9 years ago Closed 5 years ago

Implement module for handling observer notifications

Categories

(Remote Protocol :: Marionette, defect)

Version 2
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: whimboo, Unassigned)

References

Details

(Keywords: pi-marionette-firefox-puppeteer)

      No description provided.
Blocks: 1121698
For various actions in our tests we have to wait until a specific or multiple observer notifications have been sent. Therefore we need a module which can wrap the following:

* Registration of a defined set of observer topics
* Executing a callback to triggering the wanted action
* Wait until all the registered topics have been fired
* Remove all registered observer topics

To make this happen we have to use execute_script or execute_async_script, at least for the waiting part. It's not that clear yet how to best handle the same observer topic multiple times for e.g. different observer targets. Registering topics separately causes a bit of overhead at least in Mozmill, so for performance reasons this needs to be investigated a bit.

Maybe it would be good to store the details of the notification in an object and let the client have access to it for evaluation.
Summary: Use observer notifications for properly handling chrome windows → Implement module for handling observer notifications
Blocks: 1121702
Blocks: 1121705
Blocks: 1121731
Depends on: 1122591
Blocks: 1129683
With the implementation of the multiple sandbox feature on bug 1149618 we can finally start in using observer notifications for our tests. I won't have the time to work on it in a short term, but if someone else wants to work on it I can definitely give guidance. But I think it's too hard for a mentored bug.
Assignee: hskupin → nobody
Status: ASSIGNED → NEW
QA Contact: hskupin
Product: Mozilla QA → Testing
Hey Henrik, any progress on this? Was only asking because looking through the puppeteer code I see it still as being needed to be worked on.
Right now there is no immediate need for it. Do you need anything specific?
Not right now. Thanks for that info!
No longer blocks: 1121705

I don't think that it makes sense to have a general observer handling module in firefox-puppeteer at this time. It's better to setup the necessary event and observer listeners via a Promise by the code which needs to wait for something specific. Maybe this bug can be re-evaluated later, but for now it's a wontfix.

Status: NEW → RESOLVED
Closed: 5 years ago
Component: Firefox UI Tests → Marionette
QA Contact: hskupin
Resolution: --- → WONTFIX
Whiteboard: [lib]
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.