Bug 851658 - Fix test_proximity_change intermittent failure; r=jgriffin

This commit is contained in:
Rob Wood 2013-04-09 09:21:50 -04:00
parent ad08944f88
commit ac31dd6215

View File

@ -54,6 +54,9 @@ function changeProximity() {
is(event.value, expectedEvent.value, "value");
is(event.min, expectedEvent.min, "min");
is(event.max, expectedEvent.max, "max");
// Turn off event handler and listener
window.ondeviceproximity = null;
window.removeEventListener('deviceproximity', listener);
restoreProximity();
};
@ -73,9 +76,6 @@ function restoreProximity() {
}
function cleanUp() {
// Turn proximity event listener and handler off
window.removeEventListener('deviceproximity', listener);
window.ondeviceproximity = null;
finish();
}