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 e514fe0be1c09b4fe52efa257f53062611c7586c..7d3c97e46cd7e60e4251b3b8b544df0de2780c12 100644 |
--- a/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js |
+++ b/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js |
@@ -249,6 +249,7 @@ function sensor_mocks(mojo) { |
this.resolve_func_ = null; |
this.is_continuous_ = false; |
this.max_frequency_ = 60; |
+ this.min_frequency_ = 1; |
this.binding_ = new bindings.Binding(sensor_provider.SensorProvider, |
this); |
} |
@@ -288,6 +289,7 @@ function sensor_mocks(mojo) { |
buffer_offset: offset, |
mode: reporting_mode, |
default_configuration: default_config, |
+ minimum_frequency: this.min_frequency_, |
maximum_frequency: this.max_frequency_}); |
if (this.resolve_func_ !== null) { |
@@ -319,6 +321,7 @@ function sensor_mocks(mojo) { |
this.get_sensor_should_fail_ = false; |
this.resolve_func_ = null; |
this.max_frequency_ = 60; |
+ this.min_frequency_ = 1; |
this.is_continuous_ = false; |
this.binding_.close(); |
} |
@@ -349,6 +352,11 @@ function sensor_mocks(mojo) { |
setMaximumSupportedFrequency(frequency) { |
this.max_frequency_ = frequency; |
} |
+ |
+ // Sets the minimum frequency for a concrete sensor. |
+ setMinimumSupportedFrequency(frequency) { |
+ this.min_frequency_ = frequency; |
+ } |
} |
let mockSensorProvider = new MockSensorProvider; |