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 236262f349f50d185ffa0fb3476e589cc635b794..262145feca1793baebf1d93189cdde29be69e497 100644 |
--- a/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js |
+++ b/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js |
@@ -41,7 +41,6 @@ |
this.reporting_mode_ = reportingMode; |
this.sensor_reading_timer_id_ = null; |
this.update_reading_function_ = null; |
- this.reading_updates_count_ = 0; |
this.suspend_called_ = null; |
this.resume_called_ = null; |
this.add_configuration_called_ = null; |
@@ -64,9 +63,6 @@ |
return Promise.resolve({frequency: 5}); |
} |
- reading_updates_count() { |
- return this.reading_updates_count_; |
- } |
// Adds configuration for the sensor and starts reporting fake data |
// through update_reading_function_ callback. |
addConfiguration(configuration) { |
@@ -131,7 +127,6 @@ |
this.stopReading(); |
this.expects_modified_reading_ = false; |
- this.reading_updates_count_ = 0; |
this.start_should_fail_ = false; |
this.update_reading_function_ = null; |
this.active_sensor_configurations_ = []; |
@@ -199,17 +194,13 @@ |
startReading() { |
if (this.update_reading_function_ != null) { |
- this.stopReading(); |
let max_frequency_used = |
this.active_sensor_configurations_[0].frequency; |
let timeout = (1 / max_frequency_used) * 1000; |
this.sensor_reading_timer_id_ = window.setInterval(() => { |
- if (this.update_reading_function_) { |
+ if (this.update_reading_function_) |
this.update_reading_function_(this.buffer_, |
- this.expects_modified_reading_, |
- this.reading_updates_count_); |
- this.reading_updates_count_++; |
- } |
+ this.expects_modified_reading_); |
if (this.reporting_mode_ === sensor.ReportingMode.ON_CHANGE) { |
this.client_.sensorReadingChanged(); |
} |