| 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 6eb0f8d66e8c09e3524722177911fe55abb161f9..34d523c3fc6b0c379c3c2aadc1cedabb66388569 100644
|
| --- a/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
|
| +++ b/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
|
| @@ -49,10 +49,6 @@ function sensor_mocks(mojo) {
|
| addConfiguration(configuration) {
|
| assert_not_equals(configuration, null, "Invalid sensor configuration.");
|
|
|
| - if (this.add_configuration_called_ != null) {
|
| - this.add_configuration_called_(this);
|
| - }
|
| -
|
| if (!this.start_should_fail_ && this.update_reading_function_ != null) {
|
| let timeout = (1 / configuration.frequency) * 1000;
|
| this.sensor_reading_timer_id_ = window.setTimeout(() => {
|
| @@ -61,10 +57,13 @@ function sensor_mocks(mojo) {
|
| this.client_.sensorReadingChanged();
|
| }
|
| }, timeout);
|
| -
|
| - this.active_sensor_configurations_.push(configuration);
|
| }
|
|
|
| + this.active_sensor_configurations_.push(configuration);
|
| +
|
| + if (this.add_configuration_called_ != null)
|
| + this.add_configuration_called_(this);
|
| +
|
| return sensorResponse(!this.start_should_fail_);
|
| }
|
|
|
|
|