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

Unified Diff: third_party/WebKit/LayoutTests/sensor/accelerometer.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/accelerometer.html
diff --git a/third_party/WebKit/LayoutTests/sensor/accelerometer.html b/third_party/WebKit/LayoutTests/sensor/accelerometer.html
index 9339d358e6ae23edd23754f4e58c9081523c46e9..98c6f5d5f7d84fc59005c3fc2f3ecc5a34b6f342 100644
--- a/third_party/WebKit/LayoutTests/sensor/accelerometer.html
+++ b/third_party/WebKit/LayoutTests/sensor/accelerometer.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(Accelerometer, update_sensor_reading, verify_sensor_reading);
« no previous file with comments | « device/generic_sensor/public/cpp/sensor_reading.h ('k') | third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698