[ https://issues.apache.org/jira/browse/CB-6721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14003786#comment-14003786 ]
Jesse MacFadyen commented on CB-6721: ------------------------------------- The reason for checking me._level is that we need to compare the previous value AND the present value. ie. before the added tests, - a change of 21->19 would NOT cause a batterylow event - a change of 11-9 would NOT cause a batterycritical event - a change of 19->20 ( ie charging ) DID cause a batterylow event - a change of 9->10 ( ie charging ) DID cause a batterycritical event re: #L88-L89 That is a matter of preference, yes inside the block would be better, but it is benign. Regardless, I will fix it while I am there. > iOS Failed test: battery.spec.4 should fire batterycritical events > ------------------------------------------------------------------ > > Key: CB-6721 > URL: https://issues.apache.org/jira/browse/CB-6721 > Project: Apache Cordova > Issue Type: Bug > Components: mobile-spec, Plugin Battery Status > Reporter: Shazron Abdullah > > Battery (navigator.battery) battery.spec.4 should fire batterycritical events. > timeout: timed out after 100 msec waiting for batterycritical onEvent was not > called when level goes from 19->5 > This test is new for CB-4520 CB-4519: > https://github.com/apache/cordova-mobile-spec/commit/b5b80a6ff80d3c8b3d7618fe051c824ec0d3771f -- This message was sent by Atlassian JIRA (v6.2#6252)