Index: content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html |
diff --git a/content/test/data/device_sensors/device_motion_test.html b/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html |
similarity index 71% |
copy from content/test/data/device_sensors/device_motion_test.html |
copy to content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html |
index 11b4e05df1bb0d9832a7ba1a36df38ebc0527a58..c1ae2d3f50785799c4bfe8cb6a9bef1c3c07ebc6 100644 |
--- a/content/test/data/device_sensors/device_motion_test.html |
+++ b/content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html |
@@ -1,18 +1,19 @@ |
<html> |
<head> |
- <title>DeviceMotion test</title> |
+ <title>DeviceMotion only some sensors are available test</title> |
<script type="text/javascript"> |
+ let expectedInterval = Math.floor(1000000 / 60); |
function checkMotionEvent(event) { |
return event.acceleration.x == 1 && |
event.acceleration.y == 2 && |
event.acceleration.z == 3 && |
- event.accelerationIncludingGravity.x == 4 && |
- event.accelerationIncludingGravity.y == 5 && |
- event.accelerationIncludingGravity.z == 6 && |
+ event.accelerationIncludingGravity.x == null && |
+ event.accelerationIncludingGravity.y == null && |
+ event.accelerationIncludingGravity.z == null && |
event.rotationRate.alpha == 7 && |
event.rotationRate.beta == 8 && |
event.rotationRate.gamma == 9 && |
- event.interval == 100; |
+ event.interval == expectedInterval; |
} |
function onMotion(event) { |