Closed Bug 1860955 Opened 2 years ago Closed 10 months ago

Serialize entire browsing context tree for "browsingContext.contextDestroyed" events

Categories

(Remote Protocol :: WebDriver BiDi, enhancement, P2)

enhancement

Tracking

(firefox136 fixed)

RESOLVED FIXED
136 Branch
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.

Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:backlog]

Hey there,

I had a few questions on the test changes:

  1. My understanding is I need to change the children parameter passed to assert_browsing_context to reflect the number of children that should exist on the context now that we pass the entire tree. Is this correct?
  2. test_iframe_destroy_parent is the only test in context_destroyed.py that 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?
  3. Why would test_delete_nested_iframes still pass with children=None? I would have expected I would need to update that to children=0.

Thanks!

Flags: needinfo?(hskupin)

(In reply to Liam DeBeasi from comment #1)

  1. My understanding is I need to change the children parameter passed to assert_browsing_context to 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.

  1. test_iframe_destroy_parent is the only test in context_destroyed.py that 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.

  1. Why would test_delete_nested_iframes still pass with children=None? I would have expected I would need to update that to children=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?

Flags: needinfo?(hskupin)
Assignee: nobody → ldebeasi
Status: NEW → ASSIGNED
Attachment #9460109 - Attachment description: Bug 1860955 - Serialize entire browsing context tree for "contextDestroyed" events r=whimboo → Bug 1860955 - [webdriver-bidi] Serialize entire browsing context tree for "contextDestroyed" events r=whimboo
Attachment #9460110 - Attachment description: Bug 1860955 - Add tests for serializing context tree for "contextDestroyed" events r=whimboo → Bug 1860955 - [wdspec] Updating tests for serializing the full context tree for "browsingContext.contextDestroyed" events.
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa304da9c184 [webdriver-bidi] Serialize entire browsing context tree for "contextDestroyed" events r=whimboo,webdriver-reviewers https://hg.mozilla.org/integration/autoland/rev/ceff112065fd [wdspec] Updating tests for serializing the full context tree for "browsingContext.contextDestroyed" events. r=whimboo,webdriver-reviewers
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/50220 for changes under testing/web-platform/tests
Whiteboard: [webdriver:backlog] → [webdriver:backlog], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

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.

Points: 2 → ---
Whiteboard: [webdriver:backlog], [wptsync upstream] → [webdriver:m15][webdriver:external][wptsync upstream]
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot

(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!

Flags: needinfo?(ldebeasi)

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.

Flags: needinfo?(ldebeasi)
Whiteboard: [webdriver:m15][webdriver:external][wptsync upstream] → [webdriver:m15][webdriver:external][wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: