browsingContext.create should resolve only after browsingContext.contextCreated was emitted
Categories
(Remote Protocol :: WebDriver BiDi, defect, P3)
Tracking
(firefox125 affected)
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | affected |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [webdriver:m10], [wptsync upstream])
Attachments
(2 files)
Currently in Firefox, a browsingContext.create command will resolve before browsingContext.contextCreated is emitted. This does not match the spec, because the steps to create a new window are synchronous and should trigger the contextCreated before returning.
Chrome implements the correct command + event order, and this discrepancy currently blocks a BiDi refactor in puppeteer: https://github.com/puppeteer/puppeteer/pull/11836
We should be able to internally wait for browsingContext.contextCreated before resolving the create command
| Assignee | ||
Comment 1•2 years ago
|
||
While we don't explicitly wait for contextCreated in browsingContext.create, testing locally I always get the event before the command resolves.
Also looking at the implementation, we already have the browsing context and wait for the initial navigation to be done before we resolve, so it's a bit unlikely that we are emitting contextCreated after resolving.
| Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 3•2 years ago
|
||
Depends on D201104
This makes it very explicit that we are waiting for the context to be attached (and therefore contextCreated has been emitted), but I don't think we
need it.
We already have a valid browser.browsingContext and we also call waitForInitialNavigationCompleted, so I don't think there is any way the context is
not attached before we resolve.
It doesn't hurt to explicitly wait, but I think it's enough to have tests to check we are not regressing here.
| Assignee | ||
Updated•2 years ago
|
Comment 6•1 year ago
|
||
| bugherder | ||
For now we just only landed a test to check how stable it is and if we need another fix for BiDi. So lets keep the bug open for a bit.
Updated•1 year ago
|
I wanted to check the stability of the new test on wpt.fyi but I'm not able to see the test results in the history.
Julian, could you please follow-up? So far it looks to pass in our CI as well, so maybe we don't need a fix for BiDi?
| Assignee | ||
Comment 10•1 year ago
|
||
The test is visible on your link and is always green on Firefox/Chrome/Edge.
Description
•