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

Unified Diff: third_party/WebKit/LayoutTests/sensor/magnetometer.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/magnetometer.html
diff --git a/third_party/WebKit/LayoutTests/sensor/magnetometer.html b/third_party/WebKit/LayoutTests/sensor/magnetometer.html
index 3ad97e59d2c763137c7454ba3bb22c8428d2901e..14f429e05b17fc5ad032aa630642fa3cb8f1d7d6 100644
--- a/third_party/WebKit/LayoutTests/sensor/magnetometer.html
+++ b/third_party/WebKit/LayoutTests/sensor/magnetometer.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 == kDefaultReadingValueX &&
- reading.y == kDefaultReadingValueY &&
- reading.z == kDefaultReadingValueZ;
+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 == kDefaultReadingValueX &&
+ sensor.y == kDefaultReadingValueY &&
+ sensor.z == kDefaultReadingValueZ &&
+ sensor.timestamp != null;
}
runGenericSensorTests(Magnetometer, update_sensor_reading, verify_sensor_reading);

Powered by Google App Engine
This is Rietveld 408576698