chore(protocol): replace EventTarget interface with __waitInfo__ message#40718
chore(protocol): replace EventTarget interface with __waitInfo__ message#40718dgozman wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Drops the synthetic `EventTarget` interface and its `waitForEventInfo` method. The before/log/after wait notifications now travel as a fire-and-forget `__waitInfo__` message validated against a new `WaitInfo` struct, mirroring how `__create__`/`__adopt__`/`__dispose__` are handled. The client-side `Waiter` builds the action title locally and sends through `_wrapApiCall` so trace viewer and test runner steps render the same `Wait for event "<event>"` text as before.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Fire-and-forget __waitInfo__ in sendMessageToServer was throwing on a closed connection and the void'd promise leaked as an unhandled rejection, surfacing as "Error: Browser closed" in tests. Silently drop it instead, matching the fire-and-forget contract. Also extend the trace test to expect the new "Wait for event ..." title attached to __waitInfo__'s before event.
Test results for "MCP"9 failed 7022 passed, 1068 skipped Merge workflow run. |
Test results for "tests 1"4 flaky41692 passed, 850 skipped Merge workflow run. |
Summary
EventTargetprotocol interface and per-channelwaitForEventInfoplumbing.__waitInfo__message validated against a newWaitInfostruct (handled indispatcher.dispatch()alongside__create__/__adopt__/__dispose__).Waiterbuilds theWait for event "<event>"title locally and goes through_wrapApiCall, preserving trace-viewer and test-runner step titles.