Chromium Code Reviews| Index: content/test/data/generic_sensor/ambient_light_sensor_test.html |
| diff --git a/content/test/data/generic_sensor/ambient_light_sensor_test.html b/content/test/data/generic_sensor/ambient_light_sensor_test.html |
| index 346bfc14b22ca04dd1421a2c0c5c74ca3793869d..9453eab723dfbc80f14c6f850edb86409acb6562 100644 |
| --- a/content/test/data/generic_sensor/ambient_light_sensor_test.html |
| +++ b/content/test/data/generic_sensor/ambient_light_sensor_test.html |
| @@ -3,10 +3,11 @@ |
| <title>AmbientLight Generic Sensor test</title> |
| <script type="text/javascript"> |
| var timeOrigin; |
| + var sensor; |
| function onAmbientLightReadingChange(event) { |
|
timvolodine
2016/11/07 15:49:19
what's the event here? SensorReadingEvent has been
Mikhail
2016/11/08 09:09:15
indeed, thanks for the catch!
|
| - if (event.reading.illuminance == 50 && |
| - event.reading.timeStamp > timeOrigin && |
| - event.reading.timeStamp < window.performance.now()) { |
| + if (sensor.reading.illuminance == 50 && |
| + sensor.reading.timeStamp > timeOrigin && |
| + sensor.reading.timeStamp < window.performance.now()) { |
| pass(); |
| } else { |
| fail(); |
| @@ -14,7 +15,7 @@ |
| } |
| function start() { |
| - var sensor = new AmbientLightSensor(); |
| + sensor = new AmbientLightSensor(); |
| timeOrigin = window.performance.now(); |
| sensor.onchange = function(e) { |
| onAmbientLightReadingChange(e); |