You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2014/11/24 07:38:58 UTC

[2/2] cordova-plugin-contacts git commit: CB-7896 Better way to detect Windows and WidnowsPhone81

CB-7896 Better way to detect Windows and WidnowsPhone81


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/5e4ce8a4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/5e4ce8a4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/5e4ce8a4

Branch: refs/heads/master
Commit: 5e4ce8a48f39ef9c7ec74ed5e5f0909efff794e7
Parents: 684a451
Author: sgrebnov <v-...@microsoft.com>
Authored: Mon Nov 24 09:36:37 2014 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Mon Nov 24 09:36:37 2014 +0300

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/5e4ce8a4/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 90fdee1..be0ac32 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -25,8 +25,8 @@ exports.defineAutoTests = function () {
   var gContactObj = null,
     gContactId = null,
     isWindowsPhone8 = cordova.platformId == 'windowsphone',
-    isWindows = (cordova.platformId === "windows") || (navigator.appVersion.indexOf("MSAppHost/1.0") !== -1),
-    isWindowsPhone81 = (navigator.appVersion.indexOf("Windows Phone 8.1;") !== -1);
+    isWindows = (cordova.platformId === "windows") || (cordova.platformId === "windows8"),
+    isWindowsPhone81 =  isWindows && WinJS.Utilities.isPhone;
   var fail = function(done) {
     expect(true).toBe(false);
     done();


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