From c1e1ec4f90eccb0ee83cebde4093a58b9ed26d33 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Wed, 9 Sep 2020 16:46:11 -0700 Subject: [PATCH] sensors: Drop tests for Sensor.start()/stop() return types. These tests were essentially verifying IDL compliance for some methods, which is not very relevant in this context. Change-Id: Ib103418bf03b8843eda90ae291dceb224cf9e4a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398918 Commit-Queue: Reilly Grant Auto-Submit: Raphael Kubo da Costa Reviewed-by: Reilly Grant Cr-Commit-Position: refs/heads/master@{#805545} --- generic-sensor/generic-sensor-tests.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/generic-sensor/generic-sensor-tests.js b/generic-sensor/generic-sensor-tests.js index 7aac34945212e3..129ccd48543d6d 100644 --- a/generic-sensor/generic-sensor-tests.js +++ b/generic-sensor/generic-sensor-tests.js @@ -283,17 +283,6 @@ function runGenericSensorTests(sensorName, }, `${sensorName}: Test that sensor can be successfully created and its\ states are correct.`); - sensor_test(async t => { - assert_implements(sensorName in self, `${sensorName} is not supported.`); - const sensor = new sensorType(); - const sensorWatcher = new EventWatcher(t, sensor, ["activate", "error"]); - const start_return = sensor.start(); - - await sensorWatcher.wait_for("activate"); - assert_equals(start_return, undefined); - sensor.stop(); - }, `${sensorName}: sensor.start() returns undefined.`); - sensor_test(async t => { assert_implements(sensorName in self, `${sensorName} is not supported.`); const sensor = new sensorType(); @@ -307,17 +296,6 @@ function runGenericSensorTests(sensorName, }, `${sensorName}: no exception is thrown when calling start() on already\ started sensor.`); - sensor_test(async t => { - assert_implements(sensorName in self, `${sensorName} is not supported.`); - const sensor = new sensorType(); - const sensorWatcher = new EventWatcher(t, sensor, ["activate", "error"]); - sensor.start(); - - await sensorWatcher.wait_for("activate"); - const stop_return = sensor.stop(); - assert_equals(stop_return, undefined); - }, `${sensorName}: sensor.stop() returns undefined.`); - sensor_test(async t => { assert_implements(sensorName in self, `${sensorName} is not supported.`); const sensor = new sensorType();