@@ -1631,7 +1631,7 @@ <h2>
1631
1631
a < dfn > pending state updates</ dfn > [=queue=] of zero or more [=pressure states=], which is initially empty.
1632
1632
</ li >
1633
1633
< li >
1634
- a < dfn > sample update interval</ dfn > positive number, initially set to 0 (update immidiately ).
1634
+ a < dfn > sample update interval</ dfn > positive number, initially set to -1 (don't update ).
1635
1635
</ li >
1636
1636
</ ul >
1637
1637
</ p >
@@ -1876,41 +1876,49 @@ <h4>
1876
1876
< a data-cite ="!WEBDRIVER2#dfn-getting-properties "> get a property</ a > "states" from |parameters|.
1877
1877
</ li >
1878
1878
< li >
1879
- If |states| is undefined or is not an Array, return [=error=] with [=error code|WebDriver error code=] [=invalid argument=].
1880
- </ li >
1881
- < li >
1882
- For each |state| in |states|:
1879
+ If |states| is not undefined:
1883
1880
< ol >
1884
1881
< li >
1885
- If |state | is not a [=string=] and a valid {{PressureState}} , return [=error=] with [=error code|WebDriver error code=] [=invalid argument=].
1882
+ If |states | is not an Array , return [=error=] with [=error code|WebDriver error code=] [=invalid argument=].
1886
1883
</ li >
1887
1884
< li >
1888
- Push |state| to |virtualPressureSource|'s [=pending state updates=].
1885
+ For each |state| in |states|:
1886
+ < ol >
1887
+ < li >
1888
+ If |state| is not a [=string=] and a valid {{PressureState}}, return [=error=] with [=error code|WebDriver error code=] [=invalid argument=].
1889
+ </ li >
1890
+ < li >
1891
+ Push |state| to |virtualPressureSource|'s [=pending state updates=].
1892
+ </ li >
1893
+ </ ol >
1889
1894
</ li >
1890
1895
</ ol >
1891
- </ li >
1892
1896
< li >
1893
1897
Let |sampleInterval| be the result of invoking
1894
1898
< a data-cite ="!WEBDRIVER2#dfn-getting-properties "> get a property</ a > "sampleInterval" from |parameters|.
1895
1899
</ li >
1896
1900
< li >
1897
- If |sampleInterval| is not an Number, return [=error=] with [=error code|WebDriver error code=] [=invalid argument=].
1898
- </ li >
1899
- < li >
1900
- If |sampleInterval| is negative, stop updating the [=mock platform collector=].
1901
- </ li >
1902
- < li >
1903
- If |sampleInterval| is positive, start updating the [=mock platform collector=] each |sampleInterval| milliseconds:
1901
+ If |sampleInterval| is not undefined:
1904
1902
< ol >
1905
1903
< li >
1906
- Let |state| be the result of [=stack/pop|popping =] a value from [=pending state updates =].
1904
+ If |sampleInterval| is not an Number, return [=error =] with [=error code|WebDriver error code=] [=invalid argument =].
1907
1905
</ li >
1908
1906
< li >
1909
- If |state| is not undefined, update the [=mock platform collector=] with the value, or else do nothing.
1907
+ If |sampleInterval| is negative, stop updating the [=mock platform collector=].
1908
+ </ li >
1909
+ < li >
1910
+ If |sampleInterval| is positive, start updating the [=mock platform collector=] each |sampleInterval| milliseconds:
1911
+ < ol >
1912
+ < li >
1913
+ Let |state| be the result of [=stack/pop|popping=] a value from [=pending state updates=].
1914
+ </ li >
1915
+ < li >
1916
+ If |state| is not undefined, update the [=mock platform collector=] with the value, or else do nothing.
1917
+ </ li >
1918
+ </ ol >
1910
1919
</ li >
1911
1920
</ ol >
1912
1921
</ li >
1913
- </ li >
1914
1922
< li >
1915
1923
Return [=success=] with data < code > null</ code > .
1916
1924
</ li >
0 commit comments