You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Alexander Sorokin (JIRA)" <ji...@apache.org> on 2015/04/13 11:31:20 UTC
[jira] [Resolved] (CB-8808) Battery.spec.3.2 fails on windows phone
8.1
[ https://issues.apache.org/jira/browse/CB-8808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Sorokin resolved CB-8808.
-----------------------------------
Resolution: Fixed
> Battery.spec.3.2 fails on windows phone 8.1
> -------------------------------------------
>
> Key: CB-8808
> URL: https://issues.apache.org/jira/browse/CB-8808
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Battery Status, Windows
> Reporter: Alexander Sorokin
>
> This failure is happening because the tests assume that battery status wouldn't change between mocks, when event listener is added, but it actually changes back to 100% on windows phone 8.1:
> {code}
> navigator.battery._status({
> level : 5,
> isPlugged : false
> });
> window.addEventListener("batterylow", onEvent, false);
> navigator.battery._status({
> level: 20,
> isPlugged: false
> });
> {code}
> Event listener should be added before first mock so that windows wouldn't have the time to change the battery status in between mocks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org