web-platform-tests / web-platform-tests/rfcs
Support `test_driver.set_permission()` inside `.any.js` (for workers)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 110
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
test_driver is only designed to work on the window context. Which is fine as many webdriver commands like moving pointers only makes sense there, but set_permission is often required also for workers to enable certain features there, e.g. service worker-specific showNotification() behind notification permission.
Perhaps we can:
- Provide some way to tunnel the test_driver requests to the main thread as
service_worker_test()does? - Or provide a way to run a script on the main window before starting the tests in the worker context?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the test_driver.set_permission() entry point and the .any.js worker context, then compare how service_worker_test() handles requests. Determine how permission setup should work before worker tests run, and consider both tunneling requests to the main thread and running a main-window script. Done means workers can use set_permission() for features such as service-worker showNotification().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100