-
Notifications
You must be signed in to change notification settings - Fork 11
Commit afd4b36

Raphael Kubo da Costa
Add an Automation section with WebDriver support to the spec (#284)
Add WebDriver endpoints which allow manipulating virtual pressure sources,
which are pressure sources whose behavior and samples are entirelly
user-controlled. Also contrary to regular pressure sources, the provided
samples (or, in spec parlance, a virtual pressure source's latest sample's
data) are already PressureState instances rather than raw telemetry data
that will be transformed into an adjusted pressure state.
Caveats:
- Shared workers are unsupported at the moment (i.e. the WebDriver endpoints
only have an effect on Window and DedicaredWorkerGlobalScope globals).
Storing virtual pressure source information in a top-level traversable
does not play well with shared workers, for which the concept is somewhat
irrelevant.
We need to think of a different solution in the future if support for
shared workers is important.
- Once `PressureObserver.observe()` resolves, the same platform collector
will be used until `disconnect()` or `unobserve()` are called. In other
words, if a PressureObserver instance is active and using a real pressure
source, adding a virtual pressure source of the same type will only have
an effect on it and other instances in the same global once they all
disconnect from the existing pressure source first.
In terms of changes to the existing algorithms and concepts:
- A top-level traversable has a mapping of source types to virtual pressure
sources that is manipulated by the WebDriver endpoints.
- When creating a new platform collector, `PressureObserver.observe()` first
attempts to use a virtual pressure source when one exists and can be used.
- The data collection algorithm distinguishes between the data format used
by a virtual pressure source (which already is a PressureState) and by a
real pressure source (which needs to be transformed into a PressureState).
Co-authored with @kenchris in #265. It was split off as a separate pull
request to make it easier to review and understand.
Fixes #282.1 parent 10b4251 commit afd4b36Copy full SHA for afd4b36
File tree
Expand file treeCollapse file tree
1 file changed
+503
-18
lines changedFilter options
Expand file treeCollapse file tree
1 file changed
+503
-18
lines changed
0 commit comments