summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/gyroscope/resources/sensor-data.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/gyroscope/resources/sensor-data.js')
-rw-r--r--testing/web-platform/tests/gyroscope/resources/sensor-data.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/web-platform/tests/gyroscope/resources/sensor-data.js b/testing/web-platform/tests/gyroscope/resources/sensor-data.js
new file mode 100644
index 0000000000..409ffef9a1
--- /dev/null
+++ b/testing/web-platform/tests/gyroscope/resources/sensor-data.js
@@ -0,0 +1,23 @@
+'use strict';
+
+const kGyroscopeSensorData = {
+ sensorName: 'Gyroscope',
+ permissionName: 'gyroscope',
+ testDriverName: 'gyroscope',
+ featurePolicyNames: ['gyroscope']
+};
+
+// Due to the gyroscope input values being rounded using a precision of
+// 0.1 deg/sec, the expectedReadings and expectedRemappedReadings contain
+// a significant number of decimal places.
+const kGyroscopeReadings = {
+ readings: [
+ { x: 1, y: 2, z: 3 }
+ ],
+ expectedReadings: [
+ { x: 1.00007366, y: 2.00014732, z: 3.00022098 }
+ ],
+ expectedRemappedReadings: [
+ { x: -2.00014732, y: 1.00007366, z: 3.00022098 }
+ ]
+};