Skip to content

Commit

Permalink
sensors: Drop tests for Sensor.start()/stop() return types.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/master@{#805545}
  • Loading branch information
Raphael Kubo da Costa authored and chromium-wpt-export-bot committed Sep 9, 2020
1 parent 95ccba9 commit c1e1ec4
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions generic-sensor/generic-sensor-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit c1e1ec4

Please sign in to comment.