Closed Bug 1754273 Opened 3 years ago Closed 5 months ago

Emit "browsingContext.contextCreated" events for all open browsing contexts when subscribing to the event

Categories

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

task

Tracking

(firefox143 fixed)

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: whimboo, Assigned: ldebeasi)

References

(Blocks 2 open bugs, )

Details

(Whiteboard: [webdriver:m17], [webdriver:external], [wptsync upstream], [webdriver:relnote])

Attachments

(2 files, 1 obsolete file)

The remote end subscribe steps in the spec require us to emit created events for every open browsing context.

https://w3c.github.io/webdriver-bidi/#ref-for-remote-end-subscribe-steps%E2%91%A1

This can be worked on once the initial implementation has been landed.

Severity: -- → S3
Depends on: 1694391
Priority: -- → P3
Whiteboard: [bidi-m3-mvp]
Points: --- → 8
Whiteboard: [bidi-m3-mvp] → [webdriver:backlog]

Moving to P2 because this bug is needed for the implementation on bug 1801284.

Priority: P3 → P2

As discussed on Element with bug 1723102 fixed this is more a 3 points worth bug.

Points: 8 → 3
Depends on: 1723102
See Also: → 1819745
Attachment #9383257 - Attachment is obsolete: true

Via bug 1882232 we will get a simple test.

Depends on: 1882232

When we implement that feature we should potentially emit these events before session.subscribe returns. See also: https://github.com/w3c/webdriver-bidi/issues/696

Hey there! I'm interested in working on this bug. I had a couple questions about solving this problem:

  1. Do you have any recommendations for how I implement this solution? I could update the subscribe method in session.sys.mjs to grab the browsing contexts and emit the event that way.
  2. For tests I'll need to remove the expected fail from test_existing_context. Would you like me to add any other test cases?
Flags: needinfo?(hskupin)

Hi Liam. First, sorry for the late reply but somehow the needinfo got under the wire. I just noticed it now.

(In reply to Liam DeBeasi from comment #6)

  1. Do you have any recommendations for how I implement this solution? I could update the subscribe method in session.sys.mjs to grab the browsing contexts and emit the event that way.

The session.subscribe command handles all kinds of events, so we cannot directly add the new logic there. Instead we should probably call some additional method where the event is actually getting subscribed; this is in the root/browsingContext.sys.mjs module and in BrowsingContextModule::subscribeEvent. But I'm not 100% sure right now if that's really the best place because once we support subscribe priority (see bug 1801284) we have to call those methods in the right order.

Liam, so if you are still interested and want to work on a more complicated bug, you could certainly start on this one. But it's totally fine to switch to some other bug instead. Just let us know. Thanks!

Flags: needinfo?(hskupin) → needinfo?(ldebeasi)

Thanks for the reply! I can take a shot at this ticket. I can add the logic in the file you mentioned as well as add tests. That way, when subscribe priority is implemented we'll have test coverage to ensure this behavior does not accidentally break.

Flags: needinfo?(ldebeasi)
Assignee: nobody → ldebeasi
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7c415b316abe https://hg.mozilla.org/integration/autoland/rev/89bbbe4d7bab Emit browsingContext.contextCreated event for all open contexts when subscribing to the event. r=webdriver-reviewers,jdescottes https://github.com/mozilla-firefox/firefox/commit/38f668d3ea44 https://hg.mozilla.org/integration/autoland/rev/9782681d7671 [wdspec] Update context_created tests for new browsingContext.contextCreated event emission behavior r=webdriver-reviewers,jdescottes
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/54127 for changes under testing/web-platform/tests
Whiteboard: [webdriver:backlog] → [webdriver:backlog], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
Upstream PR merged by moz-wptsync-bot
Points: 3 → ---
Whiteboard: [webdriver:backlog], [wptsync upstream] → [webdriver:m17], [webdriver:external], [wptsync upstream]

This was excellent work! Thanks a lot Liam for spending your valuable time on this particular BiDi event.

Whiteboard: [webdriver:m17], [webdriver:external], [wptsync upstream] → [webdriver:m17], [webdriver:external], [wptsync upstream], [webdriver:relnote]

Hi Liam. I wanted to check back with you if you would be interested on some other bug to work on. Let us know if you have the time, or find one bug yourself. Thanks!

Flags: needinfo?(ldebeasi)

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #16)

Hi Liam. I wanted to check back with you if you would be interested on some other bug to work on. Let us know if you have the time, or find one bug yourself. Thanks!

Hey there! Yes, I am interested in taking on another task. Is there a particular area that would be helpful for me to focus on?

Flags: needinfo?(ldebeasi) → needinfo?(hskupin)

Great to hear Liam! I wonder if you would be interested to finish off the remaining work on bug 1855028? We haven't gotten to this yet, but it would be great to finally have this API available given that Selenium folks are waiting on it. What do you think?

Flags: needinfo?(hskupin) → needinfo?(ldebeasi)

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #18)

Great to hear Liam! I wonder if you would be interested to finish off the remaining work on bug 1855028? We haven't gotten to this yet, but it would be great to finally have this API available given that Selenium folks are waiting on it. What do you think?

Sounds good to me! I'll take a look and let you know if I have questions.

Flags: needinfo?(ldebeasi)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: