w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

`script.addPreloadScripts` don't allow empty contexts list #577

Closed Lightning00Blade closed 8 months ago

Lightning00Blade commented 8 months ago

Found at https://github.com/web-platform-tests/wpt/pull/41932. There is an edge case with the contexts parameter in script.addPreloadScripts. If you provide an empty list to the parameter the script will never run.


Preview | Diff

jrandolf commented 8 months ago

Just change [*browsingContext.BrowsingContext] to [+browsingContext.BrowsingContext]

whimboo commented 8 months ago

@Lightning00Blade I assume that your work on https://github.com/web-platform-tests/wpt/pull/41932 will include / test this change?

Lightning00Blade commented 8 months ago

It will and it already has it actually - https://github.com/web-platform-tests/wpt/pull/41932/files#diff-e56c62f32fa10718d53bcb4f6e85a62d4b6cc241850230871d04226006473708R197