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

Unified Diff: third_party/WebKit/LayoutTests/sensor/gyroscope.html

Issue 2668173003: [Sensors] Remove SensorReading interfaces (Closed)
Patch Set: updated global-interface-listing.html Created 3 years, 11 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: third_party/WebKit/LayoutTests/sensor/gyroscope.html
diff --git a/third_party/WebKit/LayoutTests/sensor/gyroscope.html b/third_party/WebKit/LayoutTests/sensor/gyroscope.html
index 584824f2393d4e3e764f31e556a8fc0e744c0247..fc0250a9c4d15dfdc0bf6a9563c2085de27acbcb 100644
--- a/third_party/WebKit/LayoutTests/sensor/gyroscope.html
+++ b/third_party/WebKit/LayoutTests/sensor/gyroscope.html
@@ -24,10 +24,17 @@ function update_sensor_reading(buffer, expects_modified_reading, readsCount) {
buffer[2] += readsCount;
}
-function verify_sensor_reading(reading) {
- return reading.x == kDefaultReadingX &&
- reading.y == kDefaultReadingY &&
- reading.z == kDefaultReadingZ;
+function verify_sensor_reading(sensor, should_be_null) {
+ if (should_be_null) {
+ return sensor.x == null &&
+ sensor.y == null &&
+ sensor.z == null &&
+ sensor.timestamp == null;
+ }
+ return sensor.x == kDefaultReadingX &&
+ sensor.y == kDefaultReadingY &&
+ sensor.z == kDefaultReadingZ &&
+ sensor.timestamp != null;
}
runGenericSensorTests(Gyroscope, update_sensor_reading, verify_sensor_reading);

Powered by Google App Engine
This is Rietveld 408576698