Skip to content

refactor(client): replace remote-object switch with a factory registry#40672

Merged
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:client-object-factories-registry
May 6, 2026
Merged

refactor(client): replace remote-object switch with a factory registry#40672
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:client-object-factories-registry

Conversation

@dgozman
Copy link
Copy Markdown
Collaborator

@dgozman dgozman commented May 6, 2026

Summary

  • Convert the hand-written switch in Connection._createRemoteObject into a Map<string, ChannelOwnerFactory> populated by registerObjectFactories().
  • The Connection constructor seeds the registry with all built-in types, preserving today's behavior.
  • Sets up the extension point for plugin-style client modules to register their channel-owner classes from outside playwright-core/client.

No behavior change.

Convert the hand-written switch in Connection._createRemoteObject into a
Map<string, ChannelOwnerFactory> populated by registerObjectFactories().
The Connection constructor seeds the registry with all built-in types,
preserving exactly today's behavior; later changes can register
additional factories from outside playwright-core/client.

No behavior change. Sets up the extension point for plugin-style client
modules (e.g. Android) to register their channel-owner classes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Test results for "MCP"

4 failed
❌ [firefox] › mcp/http.spec.ts:103 › http transport browser lifecycle (isolated) @mcp-windows-latest-firefox
❌ [firefox] › mcp/http.spec.ts:142 › http transport browser sigint @mcp-windows-latest-firefox
❌ [msedge] › mcp/annotate.spec.ts:273 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest-msedge
❌ [msedge] › mcp/annotate.spec.ts:297 › should annotate via direct browser_annotate MCP call @mcp-windows-latest-msedge

6991 passed, 1052 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Test results for "tests 1"

Warning

The triggering workflow run ended with status cancelled. Results below may be incomplete — blob reports from cancelled or timed-out shards are missing, so passing/failing counts do not reflect the full test suite.

1 failed
❌ [firefox-page] › page/page-emulate-media.spec.ts:196 › should report hover and fine pointer for desktop @firefox-ubuntu-22.04-node20

4 flaky ⚠️ [installation tests] › playwright-cdn.spec.ts:75 › playwright cdn should not timeout on redirect `@package-installations-windows-latest`
⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:118 › should collapse repeated console messages for test `@ubuntu-latest-node22`

41587 passed, 851 skipped


Merge workflow run.

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