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

chore(bidi): retrieve default context id from the browser #35286

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Mar 19, 2025

Currently default user context id is always 'default', but the spec doesn't mention that, so we consider first available user context id as default.

This PR fixes some tests in defaultbrowsercontext-1.spec.ts for Firefox, e.g. 'should support viewport option'.

@yury-s yury-s requested a review from dgozman March 19, 2025 21:25
@yury-s yury-s merged commit 3873b72 into microsoft:main Mar 19, 2025
28 of 31 checks passed
@yury-s yury-s deleted the bidi-default-context-id branch March 19, 2025 21:43
Copy link
Contributor

Test results for "tests 1"

2 failed
❌ [webkit-library] › tests/library/video.spec.ts:441:5 › screencast › should work for popups @webkit-ubuntu-22.04-node18
❌ [webkit-library] › tests/library/video.spec.ts:475:5 › screencast › should scale frames down to the requested size @webkit-ubuntu-22.04-node18

4 flaky ⚠️ [firefox-library] › tests/library/inspector/cli-codegen-aria.spec.ts:76:7 › should update aria snapshot highlight @firefox-ubuntu-22.04-node18
⚠️ [firefox-page] › tests/page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › tests/library/browsercontext-viewport-mobile.spec.ts:97:5 › mobile viewport › should fire orientationchange event @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › tests/page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18

38782 passed, 808 skipped
✔️✔️✔️

Merge workflow run.

@whimboo
Copy link
Collaborator

whimboo commented Mar 20, 2025

Currently default user context id is always 'default', but the spec doesn't mention that, so we consider first available user context id as default.

The WebDriver BiDi specification explicitly states that the default context has the id default:
https://w3c.github.io/webdriver-bidi/#default-user-context

@yury-s so it would be good to update the code to not just use the first returned context but the one with the id default.

@yury-s
Copy link
Member Author

yury-s commented Mar 20, 2025

Currently default user context id is always 'default', but the spec doesn't mention that, so we consider first available user context id as default.

The WebDriver BiDi specification explicitly states that the default context has the id default: https://w3c.github.io/webdriver-bidi/#default-user-context

@yury-s so it would be good to update the code to not just use the first returned context but the one with the id default.

Thanks, updating in #35303

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.

3 participants