Index: third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js |
diff --git a/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js b/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js |
index ee5f312333cceab119156d79549531e72f380954..f9a2dd7266da82c61752bdab9424d3a8653df97f 100644 |
--- a/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js |
+++ b/third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js |
@@ -304,7 +304,10 @@ function runGenericSensorTests(sensorType, updateReading, verifyReading) { |
// By the moment slow sensor (9 Hz) is notified for the |
// next time, the fast sensor (30 Hz) has been notified |
// for int(30/9) = 3 times. |
- assert_equals(fastSensorNotifiedCounter, 3); |
+ // For continuous reporting mode updates are bound to rAF, |
+ // (not to a timer) sometimes fast sensor gets invoked 4 times. |
+ assert_true(fastSensorNotifiedCounter == 3 || |
+ fastSensorNotifiedCounter == 4); |
fastSensor.stop(); |
slowSensor.stop(); |
resolve(mockSensor); |