Skip to content

Commit

Permalink
fix: allow bluetooth.requestDevicePromptUpdated subscription (#3044)
Browse files Browse the repository at this point in the history
The specific event name was missing in the `EVENT_NAMES`, which made it
impossible to subscribe to a specific event.
  • Loading branch information
sadym-chromium authored Jan 28, 2025
1 parent d940776 commit dd4751d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/protocol/chromium-bidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export type Event = WebDriverBidi.Event | Cdp.Event | BluetoothEvent;
export const EVENT_NAMES = new Set([
// keep-sorted start
...Object.values(BiDiModule),
...Object.values(Bluetooth.EventNames),
...Object.values(BrowsingContext.EventNames),
...Object.values(Log.EventNames),
...Object.values(Network.EventNames),
Expand Down
2 changes: 1 addition & 1 deletion tests/bluetooth/test_handle_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def test_bluetooth_requestDevicePromptUpdated(websocket, context_id,
if test_headless_mode == "old":
pytest.xfail("Old headless mode does not support Bluetooth")

await subscribe(websocket, ['bluetooth'])
await subscribe(websocket, ['bluetooth.requestDevicePromptUpdated'])

url = html(HTML_SINGLE_PERIPHERAL)
await goto_url(websocket, context_id, url)
Expand Down

0 comments on commit dd4751d

Please sign in to comment.