Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement user context subscriptions #3039

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OrKoN
Copy link
Collaborator

@OrKoN OrKoN commented Jan 27, 2025

  • Introduces UserContextStorage to abstract and re-use operations on user contexts. For now, only the get operation is moved.

Issue #2983

@OrKoN OrKoN force-pushed the orkon/user-context-subscription branch 3 times, most recently from 224ef9b to 9f90bbb Compare January 27, 2025 08:36
@OrKoN OrKoN force-pushed the orkon/user-context-subscription branch from 53c7ba5 to dde1a3b Compare January 27, 2025 09:08
@OrKoN OrKoN marked this pull request as ready for review January 27, 2025 09:08
@OrKoN OrKoN requested a review from sadym-chromium January 27, 2025 09:08
@OrKoN OrKoN force-pushed the orkon/user-context-subscription branch from dde1a3b to 085ab17 Compare January 27, 2025 13:45
@OrKoN OrKoN enabled auto-merge (squash) January 27, 2025 15:26
}
// user context subscription.
if (subscription.userContextIds.size !== 0) {
if (!contextId) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: contextId became opaque. Consider renaming to browsingContextId.

@@ -69,6 +69,35 @@ async def test_subscribeWithoutContext_subscribesToEventsInAllContexts(
assert resp["params"]["context"] == context_id


@pytest.mark.asyncio
async def test_subscribeUserContext(websocket, context_id, html):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be nice to have a test for a cusom user context as well. However we can delegate it to WPT tests, up to you

Copy link
Collaborator

@sadym-chromium sadym-chromium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general LGTM, but I have a few minor comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants