Skip to content

Commit 798f314

Browse files
committed
Fixed Arnaud's comments, add support for mocking sources
1 parent 1b69c6b commit 798f314

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

index.html

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ <h3>Supported sources</h3>
161161
<em>global system thermals</em> and the <em>central [=processing unit=]</em>, also know as the CPU.
162162
Future levels of this specification MAY introduce additional [=source types=].
163163
</p>
164+
<p>
165+
If a [=virtual pressure source=] exists, the [=supported source types=] is equal to the
166+
[=source types=] [=map/keys=] in the [=virtual pressure source mapping=] [=ordered map=].
167+
</p>
164168
<pre class="idl">
165169
enum PressureSource { "thermals", "cpu" };
166170
</pre>
@@ -1609,7 +1613,7 @@ <h2>
16091613
Automation
16101614
</h2>
16111615
<p>
1612-
The Compute Pressure API pose a challenge to test authors, as fully
1616+
The Compute Pressure API poses a challenge to test authors, as fully
16131617
exercising interface requires physical hardware devices that respond in predictable ways.
16141618

16151619
To address this challenge this document defines a [[WEBDRIVER2]] [=extension
@@ -1671,7 +1675,7 @@ <h4>
16711675
</tr>
16721676
</table>
16731677
<p>
1674-
This [=extension command=] creates a new [=virtual pressure source=] of a certain
1678+
This [=extension command=] creates a new [=virtual pressure source=] of a specified
16751679
[=source type=]. Calls to {{PressureObserver/observe()}} from {{PressureObserver}} instances
16761680
of the same [=source type=] will cause this [=virtual pressure source=] to be used as their
16771681
backing pressure source until [[[#delete-virtual-pressure-source]]] is run.
@@ -1809,6 +1813,13 @@ <h4>
18091813
additional [=pending state updates=] and turning on and off reporting by setting the
18101814
[=sample update interval=].
18111815
</p>
1816+
<aside class="note" data-cite="WEBDRIVER2">
1817+
Additionally, the [=extension command=] can be used to check whether a source type is created
1818+
via the [[[#create-virtual-pressure-source]]] [=extension command=] by checking the response.
1819+
If it has not been created the response will contain the [=error=] with
1820+
[=error code|WebDriver error code=]
1821+
<a data-cite="webdriver2/#dfn-unsupported-operation">unsupported operation</a>.
1822+
</aside>
18121823
<table class="data">
18131824
<caption>
18141825
Properties of the parameters argument used by this algorithm
@@ -1866,7 +1877,8 @@ <h4>
18661877
</li>
18671878
<li>
18681879
If |topLevelVirtualPressureSourceMapping| does not [=map/contain=] |virtualPressureSource|,
1869-
return [=error=] with [=error code|WebDriver error code=] [=invalid argument=].
1880+
return [=error=] with [=error code|WebDriver error code=]
1881+
<a data-cite="webdriver2/#dfn-unsupported-operation">unsupported operation</a>.
18701882
</li>
18711883
<li>
18721884
Let |virtualPressureSource| be |topLevelVirtualPressureSourceMapping|[|virtualPressureSourceType|].
@@ -1904,10 +1916,10 @@ <h4>
19041916
If |sampleInterval| is not an Number, return [=error=] with [=error code|WebDriver error code=] [=invalid argument=].
19051917
</li>
19061918
<li>
1907-
If |sampleInterval| is negative, stop updating the [=mock platform collector=].
1919+
If |sampleInterval| is &lt; 0, stop updating the [=mock platform collector=].
19081920
</li>
19091921
<li>
1910-
If |sampleInterval| is positive, start updating the [=mock platform collector=] each |sampleInterval| milliseconds:
1922+
If |sampleInterval| is &ge; 0, start updating the [=mock platform collector=] each |sampleInterval| milliseconds:
19111923
<ol>
19121924
<li>
19131925
Let |state| be the result of [=stack/pop|popping=] a value from [=pending state updates=].

0 commit comments

Comments
 (0)