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•9 months 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.
Updated•9 months ago
|
Assignee | ||
Comment 2•9 months ago
|
||
Updated•9 months ago
|
Assignee | ||
Comment 3•9 months 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•9 months ago
|
Comment 6•8 months ago
|
||
bugherder |
Comment 7•8 months ago
|
||
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•8 months ago
|
Comment 9•8 months 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•8 months ago
|
||
The test is visible on your link and is always green on Firefox/Chrome/Edge.
Description
•