This could follow the same pattern as the tests for the Fetch API: https://github.com/w3c/web-platform-tests/tree/master/fetch/api/basic - have two HTML files (one for workers, one for non-workers) that load the same JS file that contains the actual test.
Activity
jdm commentedon Feb 3, 2016
I would call this straightforward but time-consuming, given the number of tests involved: https://github.com/w3c/web-platform-tests/tree/master/websockets
Ms2ger commentedon Feb 3, 2016
Related: #2558
Convert WebSocket tests to .any.js format
Squashed 'tools/pytest/' changes from 168daaa71f..369c711f14
Convert WebSocket tests to .any.js format
Convert WebSocket tests to .any.js format (#10598)
annevk commentedon Apr 24, 2018
Reopening in case we want to tackle the sub directories. And the couple tests that have
<meta name=variant>.#5148 (comment) can be used for conversion.