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

Unified Diff: third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.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/ambient-light-sensor.html
diff --git a/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html b/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
index 282f6336ab5bf419537492d43f168d03bcb16ee3..63b18830dc6846af615f6496ad360296c9f4c47d 100644
--- a/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
+++ b/third_party/WebKit/LayoutTests/sensor/ambient-light-sensor.html
@@ -12,15 +12,12 @@ if (!window.testRunner)
debug('This test cannot be run without the TestRunner');
const kDefaultReadingValue = 3.1415;
-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] = kDefaultReadingValue;
if (expects_modified_reading)
buffer[2] += readsCount;
-
- readsCount++;
}
function verify_sensor_reading(reading) {
« no previous file with comments | « third_party/WebKit/LayoutTests/sensor/accelerometer.html ('k') | third_party/WebKit/LayoutTests/sensor/gyroscope.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698