Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4bc81ef1ff541444927e336548af2ef1cc5808c5
https://github.com/WebKit/WebKit/commit/4bc81ef1ff541444927e336548af2ef1cc5808c5
Author: Lauro Moura <[email protected]>
Date: 2025-05-22 (Thu, 22 May 2025)
Changed paths:
M Source/WebDriver/Session.cpp
M Source/WebDriver/Session.h
M Source/WebDriver/WebDriverService.cpp
M WebDriverTests/TestExpectations.json
Log Message:
-----------
[WebDriver][BiDi] Support event subscription id's
https://bugs.webkit.org/show_bug.cgi?id=287929
Reviewed by BJ Burg.
Each call to BiDi session.subscribe should return an unique UUID to
represent that specific subscription. And in turn, `session.unsubscribe`
should allow unsubscribing either by ID or by the event name.
This commit changes the current event system to better match the spec
and keep a list of subscriptions, instead of the current model of
flagging individual events as enabled or not.
Note: As the "params" context to `session.unsubscribe` is deprecated,
we'll ignore it for now as we support only global events. But
subscribing to specific contexts is still defined in the spec and we'll
add in the future.
* Source/WebDriver/Session.cpp:
(WebDriver::Session::eventIsEnabled): Process the list of subscriptions.
(WebDriver::Session::subscribeForEvents): Create and store subscriptions,
returning the new UUID for each call.
(WebDriver::Session::unsubscribeByIDs): Added.
(WebDriver::Session::unsubscribeByEventName): Added.
(WebDriver::Session::enableGlobalEvent): Deleted.
(WebDriver::Session::disableGlobalEvent): Deleted.
* Source/WebDriver/Session.h: Added Subscription struct.
(WebDriver::Subscription::isGlobal const): Added.
* Source/WebDriver/WebDriverService.cpp:
(WebDriver::WebDriverService::bidiSessionSubscribe): Refactor, calling
the new methods in Session.
(WebDriver::WebDriverService::bidiSessionUnsubscribe): Refactor, calling
the new methods in Session.
* WebDriverTests/TestExpectations.json: Updated test results after this
change.
Canonical link: https://commits.webkit.org/295276@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes