From b911ce1e951a2d74947dab3f99f92621ea769138 Mon Sep 17 00:00:00 2001 From: alsorokin Date: Fri, 6 Mar 2015 13:24:56 +0300 Subject: [PATCH] CB-8620 Made wp8 tests not to run on windows github close #120 --- cordova-plugin-mobilespec-tests/tests/localXHR.tests.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cordova-plugin-mobilespec-tests/tests/localXHR.tests.js b/cordova-plugin-mobilespec-tests/tests/localXHR.tests.js index d579ea0..835a3d7 100644 --- a/cordova-plugin-mobilespec-tests/tests/localXHR.tests.js +++ b/cordova-plugin-mobilespec-tests/tests/localXHR.tests.js @@ -20,6 +20,8 @@ */ exports.defineAutoTests = function () { + var isWp8 = cordova.platformId === "windowsphone"; + describe("XMLHttpRequest", function () { var errorHandler = { onError: function (done) { @@ -171,7 +173,7 @@ exports.defineAutoTests = function () { // only add these tests if we are testing on windows phone - if (/Windows Phone/.exec(navigator.userAgent)) { + if (isWp8) { describe("XMLHttpRequest Windows Phone", function () { var errorHandler = { onError: function () { } }; @@ -193,7 +195,6 @@ exports.defineAutoTests = function () { return xhr; }; - console.log("running special windows tests"); it("XMLHttpRequest.spec.7 should be able to load the (WP8 backwards compatability) root page www/index.html", function (done) { expect(function () { createXHR("www/index.html", true, done, errorHandler.onError)