summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/actions.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/tools/wptrunner/wptrunner/executors/actions.py')
-rw-r--r--testing/web-platform/tests/tools/wptrunner/wptrunner/executors/actions.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/actions.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/actions.py
index cb9c1a1508..6e0c081b48 100644
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/actions.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/actions.py
@@ -443,6 +443,26 @@ class GetVirtualSensorInformationAction:
self.logger.debug("Requesting information from %s sensor" % sensor_type)
return self.protocol.virtual_sensor.get_virtual_sensor_information(sensor_type)
+class SetDevicePostureAction:
+ name = "set_device_posture"
+
+ def __init__(self, logger, protocol):
+ self.logger = logger
+ self.protocol = protocol
+
+ def __call__(self, payload):
+ posture = payload["posture"]
+ return self.protocol.device_posture.set_device_posture(posture)
+
+class ClearDevicePostureAction:
+ name = "clear_device_posture"
+
+ def __init__(self, logger, protocol):
+ self.logger = logger
+ self.protocol = protocol
+
+ def __call__(self, payload):
+ return self.protocol.device_posture.clear_device_posture()
actions = [ClickAction,
DeleteAllCookiesAction,
@@ -477,4 +497,6 @@ actions = [ClickAction,
CreateVirtualSensorAction,
UpdateVirtualSensorAction,
RemoveVirtualSensorAction,
- GetVirtualSensorInformationAction]
+ GetVirtualSensorInformationAction,
+ SetDevicePostureAction,
+ ClearDevicePostureAction]