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

Unified Diff: third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js

Issue 2885373002: [Sensors] Simplify calculation of the reporting period (Closed)
Patch Set: Created 3 years, 7 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/resources/sensor-helpers.js
diff --git a/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js b/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
index c1178c44fc2043811b2cd7bc9d95ba22c96b94dc..98648a0bc44d81f0aa2437abc52d7174680d216c 100644
--- a/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
+++ b/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
@@ -198,6 +198,9 @@ function sensor_mocks(mojo) {
this.sensor_reading_timer_id_ = window.setInterval(() => {
if (this.update_reading_function_) {
this.update_reading_function_(this.buffer_);
+ // For all tests sensor reading should have monotonically
+ // increasing timestamp in seconds.
+ this.buffer_[1] = window.performance.now() * 0.001;
this.reading_updates_count_++;
}
if (this.reporting_mode_ === sensor.ReportingMode.ON_CHANGE) {
« no previous file with comments | « third_party/WebKit/LayoutTests/sensor/magnetometer.html ('k') | third_party/WebKit/Source/modules/sensor/OrientationSensor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698