Serialize entire browsing context tree for "browsingContext.contextDestroyed" events
Categories
(Remote Protocol :: WebDriver BiDi, enhancement, P2)
Tracking
(firefox136 fixed)
| Tracking | Status | |
|---|---|---|
| firefox136 | --- | fixed |
People
(Reporter: whimboo, Assigned: ldebeasi)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [webdriver:m15][webdriver:external][wptsync upstream][webdriver:relnote])
Attachments
(2 files)
As discussed on https://github.com/w3c/webdriver-bidi/pull/578 and which will soon be merged we should send the full browsing context tree with the currently closed browsing context as parent within the payload of the browsingContext.contextDestroyed event.
| Reporter | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•10 months ago
|
||
Hey there,
I had a few questions on the test changes:
- My understanding is I need to change the
childrenparameter passed toassert_browsing_contextto reflect the number of children that should exist on the context now that we pass the entire tree. Is this correct? test_iframe_destroy_parentis the only test incontext_destroyed.pythat has any children in its tree (from what I can tell). Is this test sufficient in ensuring that children are passed, or would you like me to add a non-iframe test too?- Why would
test_delete_nested_iframesstill pass withchildren=None? I would have expected I would need to update that tochildren=0.
Thanks!
| Reporter | ||
Comment 2•10 months ago
|
||
(In reply to Liam DeBeasi from comment #1)
- My understanding is I need to change the
childrenparameter passed toassert_browsing_contextto reflect the number of children that should exist on the context now that we pass the entire tree. Is this correct?
This argument only checks the number of direct children attached to a given browsing context but not more. That means if we want to assert each and every browsing context you will have to call this method multiple times. A good example you can find in browsing_context/create/user_context.py.
test_iframe_destroy_parentis the only test incontext_destroyed.pythat has any children in its tree (from what I can tell). Is this test sufficient in ensuring that children are passed, or would you like me to add a non-iframe test too?
The test test_new_context is handling a page without any iframes. For frames we would need tests like:
- Page with eg. direct iframes and page gets closed
- Page with nested iframes and page gets closed
- Page with nested iframes and top-level iframe gets removed
- Page with nested iframes and deepest iframe gets removed
Some of those tests already exist and would need an update with this change in behavior.
- Why would
test_delete_nested_iframesstill pass withchildren=None? I would have expected I would need to update that tochildren=0.
It should not pass. Did you check the event payload what it contains? Is the nested iframe not listed after making the required change to the browsing context module in our WebDriver BiDi implementation?
| Assignee | ||
Comment 3•10 months ago
|
||
Updated•10 months ago
|
| Assignee | ||
Comment 4•10 months ago
|
||
Updated•10 months ago
|
Updated•10 months ago
|
Comment 7•10 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/fa304da9c184
https://hg.mozilla.org/mozilla-central/rev/ceff112065fd
| Reporter | ||
Comment 8•10 months ago
|
||
Liam, thanks a lot for your work on this bug! If you want feel free to find some other bug yourself or let me know and I can tell a good one.
| Reporter | ||
Comment 11•10 months ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #8)
Liam, thanks a lot for your work on this bug! If you want feel free to find some other bug yourself or let me know and I can tell a good one.
Setting a needinfo for you just in case it might have gone through unnoticed. But take your time in case you are busy at the moment. Thanks!
| Assignee | ||
Comment 12•10 months ago
|
||
Hey there! Thanks for adding the needs info. I’ll take a look at the open Webdriver BIDI issues and grab something to work on.
| Reporter | ||
Updated•9 months ago
|
Description
•