You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2012/06/05 20:40:25 UTC

spec commit: CB-868: Update geolocation tests for timestamp as Date

Updated Branches:
  refs/heads/master 9718dfe76 -> 0f717bd2b


CB-868: Update geolocation tests for timestamp as Date


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/0f717bd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/0f717bd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/0f717bd2

Branch: refs/heads/master
Commit: 0f717bd2b9989b31478f4013aabd68ef6056a622
Parents: 9718dfe
Author: macdonst <si...@gmail.com>
Authored: Tue Jun 5 14:40:03 2012 -0400
Committer: macdonst <si...@gmail.com>
Committed: Tue Jun 5 14:40:03 2012 -0400

----------------------------------------------------------------------
 autotest/tests/geolocation.tests.js |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/0f717bd2/autotest/tests/geolocation.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/geolocation.tests.js b/autotest/tests/geolocation.tests.js
index 3b5d419..685a7d6 100644
--- a/autotest/tests/geolocation.tests.js
+++ b/autotest/tests/geolocation.tests.js
@@ -21,6 +21,7 @@ describe('Geolocation (navigator.geolocation)', function () {
     describe('getCurrentPosition method', function() {
         describe('error callback', function() {
             it("should be called if we set timeout to 0 and maximumAge to a very small number", function() {
+                console.log("Here I am");
                 var win = jasmine.createSpy(),
                     fail = jasmine.createSpy();
 
@@ -44,7 +45,7 @@ describe('Geolocation (navigator.geolocation)', function () {
                 var win = jasmine.createSpy().andCallFake(function(p) {
                           expect(p.coords).toBeDefined();
                           expect(p.timestamp).toBeDefined();
-                          expect(typeof p.timestamp).toBe('number');
+                          expect(p.timestamp instanceof Date).toBe(true);
                       }),
                       fail = jasmine.createSpy();
 
@@ -66,7 +67,7 @@ describe('Geolocation (navigator.geolocation)', function () {
     describe('watchPosition method', function() {
         describe('error callback', function() {
             var errorWatch = null;
-            
+
             afterEach(function() {
                 navigator.geolocation.clearWatch(errorWatch);
             });
@@ -91,7 +92,7 @@ describe('Geolocation (navigator.geolocation)', function () {
 
         describe('success callback', function() {
             var successWatch = null;
-            
+
             afterEach(function() {
                 navigator.geolocation.clearWatch(successWatch);
             });
@@ -99,7 +100,7 @@ describe('Geolocation (navigator.geolocation)', function () {
                 var win = jasmine.createSpy().andCallFake(function(p) {
                           expect(p.coords).toBeDefined();
                           expect(p.timestamp).toBeDefined();
-                          expect(typeof p.timestamp).toBe('number');
+                          expect(p.timestamp instanceof Date).toBe(true);
                       }),
                       fail = jasmine.createSpy();