Re: [sensors] Introduce WebDriver extension API

Re **Sampling frequency**, @jugglinmike, when dig into the definition of frequency in spec, I think we don't need to set `minSamplingFrequency` and `maxSamplingFrequency`, even the `requestedSamplingFrequency`. Which must be initialized in mock sensor construction.

Spec says:
> For a nonempty set of activated sensor objects the requested sampling frequency is equal to optimal sampling frequency, which is estimated by the user agent taking into account provided frequencies of activated Sensors and sampling frequency bounds defined by the underlying platform.

If construct a `Sensor` object without a `frequency` option, UA should choose the default `requestedSamplingFrequency` as sampling frequency. Else,  with a specified `frequency` option, UA should calculate the optimal sampling frequency.

All we need is to get these three `frequency` value from mock sensor to calculate the expected sampling frequency, which should fulfill the testing for frequency. WDYT?


-- 
GitHub Notification of comment by Honry
Please view or discuss this issue at https://github.com/w3c/sensors/pull/369#issuecomment-415694926 using your GitHub account

Received on Friday, 24 August 2018 08:45:50 UTC