web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
4.98k stars 3.09k forks source link

Externally-controlled state #5669

Open jugglinmike opened 7 years ago

jugglinmike commented 7 years ago

Description The web platform is expanding to include APIs that concern state which is external to the browser. Examples include Device Orientation, Bluetooth, and Geolocation. Thoroughly testing these specifications requires precise control over the external state.

Blockers Because they aim to describe the state of the world, these specifications rarely (if ever) define methods for manual override. Simply extending the specifications to facilitate testing on an as-needed basis is not an option because if this level of control were available generally, the trust between developers, users, and the user agent would be severely undermined.

Potential solutions Work with specification authors and browser vendors to define and implement "test-only" APIs that could be enabled only under highly controlled circumstances. Not only would this would allow WPT to accept specification conformance tests, it would enable application developers to test the business logic they author using the new platform functionalities. Such "test-only" APIs could be defined in the JavaScript runtime. Alternatively, the testing APIs could be defined in terms of the WebDriver draft specification--a developing standard derived from the mature open source software project Selenium. This is being actively discussed on the public-test-infra mailing list.

foolip commented 6 years ago

Removing infra label as this does not yet describe any concrete work.