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

Unified Diff: third_party/WebKit/LayoutTests/sensor/magnetometer.html

Issue 2604483004: [Sensors] Reland: Reland: Align sensor reading updates and 'onchange' notification with rAF. (Closed)
Patch Set: Patch with fix 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/magnetometer.html
diff --git a/third_party/WebKit/LayoutTests/sensor/magnetometer.html b/third_party/WebKit/LayoutTests/sensor/magnetometer.html
index c392d444506a85dea76c5043c85e2cc3e4719363..3ad97e59d2c763137c7454ba3bb22c8428d2901e 100644
--- a/third_party/WebKit/LayoutTests/sensor/magnetometer.html
+++ b/third_party/WebKit/LayoutTests/sensor/magnetometer.html
@@ -14,17 +14,14 @@ if (!window.testRunner)
const kDefaultReadingValueX = -19.2;
const kDefaultReadingValueY = 12.1;
const kDefaultReadingValueZ = -44.3;
-var readsCount = 0;
-function update_sensor_reading(buffer, expects_modified_reading) {
+function update_sensor_reading(buffer, expects_modified_reading, readsCount) {
buffer[1] = window.performance.now();
buffer[2] = kDefaultReadingValueX;
buffer[3] = kDefaultReadingValueY;
buffer[4] = kDefaultReadingValueZ;
if (expects_modified_reading)
buffer[2] += readsCount;
-
- readsCount++;
}
function verify_sensor_reading(reading) {

Powered by Google App Engine
This is Rietveld 408576698