CB-9673 Fixed test spec.6 failure on iOS

github: close #102
This commit is contained in:
Alexander Sorokin
2015-09-16 19:04:29 +03:00
committed by daserge
parent f8b0f82dfa
commit 869eea41ec
+3
View File
@@ -45,6 +45,7 @@ exports.defineAutoTests = function () {
// flags
var isWindows = cordova.platformId === 'windows8' || cordova.platformId === 'windows';
var isWP8 = cordova.platformId === 'windowsphone';
var isIOS = cordova.platformId === 'ios';
var isBrowser = cordova.platformId === 'browser';
var isIE = isBrowser && navigator.userAgent.indexOf('Trident') >= 0;
@@ -175,6 +176,8 @@ exports.defineAutoTests = function () {
// In IE, when lengthComputable === false, event.total somehow is equal to 2^64
if (isIE) {
expect(event.total).toBe(Math.pow(2, 64));
} else if (isIOS) {
expect(event.total).toBe(-1);
} else {
expect(event.total).toBe(0);
}