Skip to content

Commit

Permalink
sensors: Drop tests for Sensor.start()/stop() return types. (#25448)
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}

Co-authored-by: Raphael Kubo da Costa <[email protected]>
  • Loading branch information
chromium-wpt-export-bot and Raphael Kubo da Costa authored Sep 10, 2020
1 parent fc1d51e commit 66ef447
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 66ef447

Please sign in to comment.