blob: 485219b9a8c999a64992c31d75e8a41e84e7e909 [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
<script src="file:///gen/services/device/public/interfaces/sensor_provider.mojom.js"></script>
<script src="resources/sensor-helpers.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,
update_sensor_reading,
verify_xyz_sensor_reading.bind(null, kDefaultReading),
verify_xyz_sensor_reading.bind(null, kMappedReading),
['gyroscope']);
</script>