You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/03/14 23:55:10 UTC

spec commit: tweaking tests for compass; trueheading and headingaccuracy if not available can be null as well

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 <ma...@gmail.com>
Authored: Wed Mar 14 15:55:01 2012 -0700
Committer: Fil Maj <ma...@gmail.com>
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();