From 798f3149107de287d58c18bb3679521c3692a4a2 Mon Sep 17 00:00:00 2001 From: Kenneth Rohde Christiansen Date: Mon, 22 Apr 2024 13:20:51 +0200 Subject: [PATCH] Fixed Arnaud's comments, add support for mocking sources --- index.html | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 317213d..da89c08 100644 --- a/index.html +++ b/index.html @@ -161,6 +161,10 @@

Supported sources

global system thermals and the central [=processing unit=], also know as the CPU. Future levels of this specification MAY introduce additional [=source types=].

+

+ If a [=virtual pressure source=] exists, the [=supported source types=] is equal to the + [=source types=] [=map/keys=] in the [=virtual pressure source mapping=] [=ordered map=]. +

       enum PressureSource { "thermals", "cpu" };
     
@@ -1609,7 +1613,7 @@

Automation

- The Compute Pressure API pose a challenge to test authors, as fully + The Compute Pressure API poses a challenge to test authors, as fully exercising interface requires physical hardware devices that respond in predictable ways. To address this challenge this document defines a [[WEBDRIVER2]] [=extension @@ -1671,7 +1675,7 @@

- This [=extension command=] creates a new [=virtual pressure source=] of a certain + This [=extension command=] creates a new [=virtual pressure source=] of a specified [=source type=]. Calls to {{PressureObserver/observe()}} from {{PressureObserver}} instances of the same [=source type=] will cause this [=virtual pressure source=] to be used as their backing pressure source until [[[#delete-virtual-pressure-source]]] is run. @@ -1809,6 +1813,13 @@

additional [=pending state updates=] and turning on and off reporting by setting the [=sample update interval=].

+
Properties of the parameters argument used by this algorithm @@ -1866,7 +1877,8 @@

  • If |topLevelVirtualPressureSourceMapping| does not [=map/contain=] |virtualPressureSource|, - return [=error=] with [=error code|WebDriver error code=] [=invalid argument=]. + return [=error=] with [=error code|WebDriver error code=] + unsupported operation.
  • Let |virtualPressureSource| be |topLevelVirtualPressureSourceMapping|[|virtualPressureSourceType|]. @@ -1904,10 +1916,10 @@

    If |sampleInterval| is not an Number, return [=error=] with [=error code|WebDriver error code=] [=invalid argument=].

  • - If |sampleInterval| is negative, stop updating the [=mock platform collector=]. + If |sampleInterval| is < 0, stop updating the [=mock platform collector=].
  • - If |sampleInterval| is positive, start updating the [=mock platform collector=] each |sampleInterval| milliseconds: + If |sampleInterval| is ≥ 0, start updating the [=mock platform collector=] each |sampleInterval| milliseconds:
    1. Let |state| be the result of [=stack/pop|popping=] a value from [=pending state updates=].