mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 01:25:53 -04:00
Some WPT tests need to interact with the browser in a way that isn't possible with web apis. Browsers need to expose a way for tests to do this and then use the testdriver-vendor.js to hook into these special WPT actions. This commit sets up the infrastructure for supporting this and includes the delete_all_cookies functionality needed by various cookie tests (e.g. /cookies/attributes/attributes-ctl.sub.html). A new compilation flag, `-Dwpt_extensions`, can be specified. When specified a `window.webdriver` accessor is defined and a `WebDriver` type is exposed. Note that, while I only implemented delete_all_cookies for now, I've seen other tests fail because of missing vendor-specific implementation.