Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Unified Diff: content/test/data/device_sensors/device_motion_only_some_sensors_are_available_test.html

Issue 2896583005: Reland: Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors (Closed)
Patch Set: address more comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698