blob: 6ebcf9a2b837199d88098a06846f47af4d8367fd [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../http/tests/resources/sensor-helpers.js"></script>
<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
<script src="file:///gen/services/device/public/mojom/sensor_provider.mojom.js"></script>
<script src="resources/generic-sensor-tests.js"></script>
<script>
'use strict';
if (!window.testRunner)
debug('This test cannot be run without the TestRunner');
const kDefaultReading = [1.12345, 2.12345, 3.12345];
const kMappedReading = [-2.12345, 1.12345, 3.12345];
function update_sensor_reading(buffer) {
buffer.set(kDefaultReading, 2);
}
runGenericSensorTests(
Gyroscope,
device.mojom.SensorType.GYROSCOPE,
update_sensor_reading,
verify_xyz_sensor_reading.bind(null, kDefaultReading),
verify_xyz_sensor_reading.bind(null, kMappedReading),
['gyroscope']);
</script>