You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/08/13 01:58:12 UTC

[jira] [Commented] (CB-7099) [WP8][cordova-plugin-media] status callback it is reached several times in the same statement

    [ https://issues.apache.org/jira/browse/CB-7099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14094914#comment-14094914 ] 

ASF subversion and git services commented on CB-7099:
-----------------------------------------------------

Commit 3317891cc7e2071a6e0ab81f223e2a9210ebb66f in cordova-plugin-media's branch refs/heads/master from [~martin.c.glez.glez]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-media.git;h=3317891 ]

CB-6963 Port Media manual & automated tests

Ported 17 Media automated & manual tests from mobilespec.

This commit adds the work done by javierbb31

Jasmine version: ported from v1.3 to v2.0

Features(automated tests):
-No spies.
-Tests failing faster, when a error callback or unexpected success
callback is received, the test fails immediately.
-Jasmine report with more information about the failed operation, which
contains the operation and a description about it.
-Jasmine reports include error callback object.
-Two timeout statement to just wait until the a media file is
reproduced, there are no more timeouts than those.
-Added a control variable to ensure that a callback is reached only
once.

Bugs:
There are two bugs reported as direct result of this porting activity.

CB-7092

https://github.com/martincgg/cordova-plugin-media/blob/9fab60a8a3de2b68cb96fdcdd36cbdbfff73ce8e/test/tests.js#L158

This one it's about a conditional added in case that the platform is
windows phone, on that platform it has an unexpected behavior at the
error callback. If the platform is windows phone the test is going to
fail, until the bug is fixed, this specific problem causes a mess with
the rest of the test.
All details related to this:
https://issues.apache.org/jira/browse/CB-7092

CB-7099

https://github.com/martincgg/cordova-plugin-media/blob/9fab60a8a3de2b68cb96fdcdd36cbdbfff73ce8e/test/tests.js#L188

https://github.com/martincgg/cordova-plugin-media/blob/9fab60a8a3de2b68cb96fdcdd36cbdbfff73ce8e/test/tests.js#L215


> [WP8][cordova-plugin-media] status callback it is reached several times in the same statement
> ---------------------------------------------------------------------------------------------
>
>                 Key: CB-7099
>                 URL: https://issues.apache.org/jira/browse/CB-7099
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media, WP8
>    Affects Versions: 3.5.0
>            Reporter: Martin Gonzalez
>            Assignee: Jesse MacFadyen
>              Labels: WP8, media
>             Fix For: 3.6.0
>
>
> The optional status callback in a Media object, it is reached multiple times in the same statement, even with the same status code.
> E.g:
> var media= new Media("http://url/to/media/file.mp3",successCallback, fail.bind(null, done), statuschange);
> The status change callback function it is reached several times, even with the same status code, if at the beginning is stopped, if the state changes to a different status code like running, it won't stop to reach and walk-through the same callback reporting the same status code.
> This behavior it can be only reproduced over Windows Phone 8. The right behavior it supposed to that status callback it would be called only if the status is changed.
> The issue was found porting tests to plugin-test-framework CB-6963.



--
This message was sent by Atlassian JIRA
(v6.2#6252)