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

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

Issue 2551223003: [Sensors] Align sensor reading updates and 'onchange' notification with rAF. (Closed)
Patch Set: Comments from Reilly Created 4 years 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/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..52d878d21b22f559e103853e9c8c7a3575ff5eb2 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);
+ // In actual implementation 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);
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/sensor/BUILD.gn » ('j') | third_party/WebKit/Source/modules/sensor/Sensor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698