Skip to content

Commit 39bea48

Browse files
authored
Merge pull request #54 from Honry/add-mock-sensor-type
Integration of mock sensor type
2 parents d6acf93 + ea4a2e3 commit 39bea48

File tree

2 files changed

+86
-19
lines changed

2 files changed

+86
-19
lines changed

index.bs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ urlPrefix: https://w3c.github.io/sensors/; spec: GENERIC-SENSOR
4242
text: sensor reading
4343
text: check sensor policy-controlled features; url: check-sensor-policy-controlled-features
4444
text: sensor permission name; url: sensor-permission-names
45+
text: automation
46+
text: mock sensor type
47+
text: MockSensorType
48+
text: mock sensor reading values
4549
</pre>
4650
<pre class=biblio>
4751
{
@@ -263,6 +267,24 @@ Abstract Operations {#abstract-operations}
263267
1. Return |ambient_light_sensor|.
264268
</div>
265269

270+
Automation {#automation}
271+
==========
272+
This section extends the [=automation=] section defined in the Generic Sensor API [[GENERIC-SENSOR]]
273+
to provide mocking information about the ambient light levels for the purposes of testing a user agent's
274+
implementation of [=Ambient Light Sensor=].
275+
276+
277+
<h3 id="mock-ambient-light-sensor-type">Mock Sensor Type</h3>
278+
279+
The {{AmbientLightSensor}} class has an associated [=mock sensor type=] which is
280+
<a for="MockSensorType" enum-value>"ambient-light"</a>, its [=mock sensor reading values=]
281+
dictionary is defined as follow:
282+
283+
<pre class="idl">
284+
dictionary AmbientLightReadingValues {
285+
required double? illuminance;
286+
};
287+
</pre>
266288

267289
Use Cases and Requirements {#usecases-requirements}
268290
=========

0 commit comments

Comments
 (0)