Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 363EA96B8 for ; Wed, 14 Mar 2012 22:55:11 +0000 (UTC) Received: (qmail 95898 invoked by uid 500); 14 Mar 2012 22:55:11 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 95885 invoked by uid 500); 14 Mar 2012 22:55:11 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 95878 invoked by uid 99); 14 Mar 2012 22:55:11 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 22:55:11 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D645571D3; Wed, 14 Mar 2012 22:55:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: filmaj@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: spec commit: tweaking tests for compass; trueheading and headingaccuracy if not available can be null as well Message-Id: <20120314225510.D645571D3@tyr.zones.apache.org> Date: Wed, 14 Mar 2012 22:55:10 +0000 (UTC) Updated Branches: refs/heads/master dc8954761 -> e1c585073 tweaking tests for compass; trueheading and headingaccuracy if not available can be null as well Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/e1c58507 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/e1c58507 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/e1c58507 Branch: refs/heads/master Commit: e1c5850733fce4f331e85d70ef596cfc7c384b00 Parents: dc89547 Author: Fil Maj Authored: Wed Mar 14 15:55:01 2012 -0700 Committer: Fil Maj Committed: Wed Mar 14 15:55:01 2012 -0700 ---------------------------------------------------------------------- autotest/tests/compass.tests.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/e1c58507/autotest/tests/compass.tests.js ---------------------------------------------------------------------- diff --git a/autotest/tests/compass.tests.js b/autotest/tests/compass.tests.js index d8adcbf..b3abf2b 100644 --- a/autotest/tests/compass.tests.js +++ b/autotest/tests/compass.tests.js @@ -17,9 +17,9 @@ Tests.prototype.CompassTests = function() { ok(a.magneticHeading !== null, "Heading object returned in getCurrentHeading success callback should have an 'magneticHeading' property."); ok(typeof a.magneticHeading == 'number', "Heading object's 'magneticHeading' property returned in getCurrentHeading success callback should be of type 'number'."); ok(a.trueHeading !== undefined, "Heading object returned in getCurrentHeading success callback should have a 'trueHeading' property."); - ok(typeof a.trueHeading == 'number', "Heading object's 'trueHeading' property returned in getCurrentHeading success callback should be of type 'number'."); + ok(typeof a.trueHeading == 'number' || a.trueHeading === null, "Heading object's 'trueHeading' property returned in getCurrentHeading success callback should be of type 'number', or should be null if not available."); ok(a.headingAccuracy !== undefined, "Heading object returned in getCurrentHeading success callback should have a 'headingAccuracy' property."); - ok(typeof a.headingAccuracy == 'number', "Heading object's 'headingAccuracy' property returned in getCurrentHeading success callback should be of type 'number'."); + ok(typeof a.headingAccuracy == 'number' || a.headingAccuracy === null, "Heading object's 'headingAccuracy' property returned in getCurrentHeading success callback should be of type 'number', or should be null if not available."); ok(a.timestamp !== null, "Heading object returned in getCurrentHeading success callback should have a 'timestamp' property."); ok(a.timestamp instanceof Date, "Heading object's 'timestamp' property returned in getCurrentHeading success callback should be of type 'Date'."); QUnit.start();