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

Unified Diff: content/test/data/generic_sensor/ambient_light_sensor_test.html

Issue 2472403002: [Sensors] Align sensor reading attribute implementation with the specification (Closed)
Patch Set: Remove a leftover from test Created 4 years, 1 month 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: 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);

Powered by Google App Engine
This is Rietveld 408576698