You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2016/03/30 20:32:02 UTC

cordova-plugin-media git commit: CB-10783: Modify expected position to be in a proper range.This closes #89

Repository: cordova-plugin-media
Updated Branches:
  refs/heads/master 3706b7576 -> 914d6edc0


CB-10783: Modify expected position to be in a proper range.This closes #89


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/914d6edc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/914d6edc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/914d6edc

Branch: refs/heads/master
Commit: 914d6edc08133ca9546818e9366b497b610ccbaf
Parents: 3706b75
Author: Sarangan Rajamanickam <sa...@microsoft.com>
Authored: Fri Mar 25 15:05:03 2016 -0700
Committer: Raghav Katyal <ra...@microsoft.com>
Committed: Wed Mar 30 11:30:02 2016 -0700

----------------------------------------------------------------------
 tests/tests.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/914d6edc/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 08c0ff7..b546638 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -372,8 +372,9 @@ exports.defineAutoTests = function () {
                         flag = false;
                         setTimeout(function () {
                             media1.getCurrentPosition(function (position) {
-                                //in four seconds expect position to be two times greater with some degree (1 sec) of accuracy
-                                expect(position).toBeGreaterThan(7);
+                                //in four seconds expect position to be between 4 & 10. Here, the values are chosen to give
+                                //a large enough buffer range for the position to fall in and are not based on any calculation.
+                                expect(position >= 4 && position < 10).toBeTruthy();
                                 media1.stop();
                                 media1.release();
                                 done();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org