Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A12791F4 for ; Tue, 5 Jun 2012 19:38:11 +0000 (UTC) Received: (qmail 75765 invoked by uid 500); 5 Jun 2012 19:38:11 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 75645 invoked by uid 500); 5 Jun 2012 19:38:11 -0000 Mailing-List: contact callback-dev-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-dev@incubator.apache.org Received: (qmail 75624 invoked by uid 99); 5 Jun 2012 19:38:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 19:38:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simon.macdonald@gmail.com designates 209.85.160.47 as permitted sender) Received: from [209.85.160.47] (HELO mail-pb0-f47.google.com) (209.85.160.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 19:38:04 +0000 Received: by pbbrq2 with SMTP id rq2so8003350pbb.6 for ; Tue, 05 Jun 2012 12:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=7CxZzkRridCpHeh4YqH7X7rmw9es4gLN/+TjyTEP+Vg=; b=C06C9cmp6QuHIrSlpCkveTEzk10dQyJgkcJRGRABQqKZsUzmfOwldqYMYaFEyvDdtv Vz3PFNhDziFiAfWBHRgFx3fd/aZS4RZ9EHxKE0j0WjshUKEgLHdRUTdqTISF+CukW4QR nOWIx87jbSwFZLi6IelVBRC6uXflVtWMHlWYdmhptnlqkyhNDchPESFLDurHiU/9PTuC 3na+SliccPKxqcxePmG5qKPIXuHipCDOWgwdive3Os/CY50GipII3YvSqSPrXSRE7W3D ShQDi64CbSmUtwLdk2DKd7RZq5xaHEUSuhWWJZdG4m90appaRN24c4+HP7HSu/4740Yc 4w1w== Received: by 10.68.222.197 with SMTP id qo5mr35402998pbc.72.1338925063217; Tue, 05 Jun 2012 12:37:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.202.35 with HTTP; Tue, 5 Jun 2012 12:37:22 -0700 (PDT) In-Reply-To: References: From: Simon MacDonald Date: Tue, 5 Jun 2012 15:37:22 -0400 Message-ID: Subject: Re: Geolocation test failures in Mobile Spec To: callback-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Okay, Becky fixed the JS while I updated the docs and mob spec. Disaster averted Godzilla has been turned away from Tokyo. Simon Mac Donald http://hi.im/simonmacdonald On Tue, Jun 5, 2012 at 2:09 PM, Becky Gibson wrote= : > Created CB-866 (https://issues.apache.org/jira/browse/CB-866) > > On Tue, Jun 5, 2012 at 1:00 PM, Becky Gibson wro= te: > >> This is the reason for the iOS failure in watchLocation. =A0 There is co= de >> in getCurrentLocation that assumes the timestamp is a Date object and do= es >> a >> >> geolocation.lastPosition.timestamp.getTime(). >> >> Since iOS is returning the timestamp in milliseconds the .getTime() call >> fails. =A0 I think we can handle this in JavaScript code as long as new >> Date(DateObjORMilliseconds) works =A0( pass a Date object or millisecond= s to >> the Date constructor). >> >> -becky >> >> On Tue, Jun 5, 2012 at 12:44 PM, Simon MacDonald < >> simon.macdonald@gmail.com> wrote: >> >>> Alright, I have to step out for a bit but I can start creating issues >>> after that. >>> >>> Simon Mac Donald >>> http://hi.im/simonmacdonald >>> >>> >>> On Tue, Jun 5, 2012 at 12:34 PM, Filip Maj wrote: >>> > Yes, do it. It is clearly a mistake on my part. I assumed (!!!!!) tha= t >>> > domtimestamp =3D=3D=3D number. >>> > >>> > *sad trumpet noise* >>> > >>> > On 6/5/12 9:31 AM, "Simon MacDonald" wrot= e: >>> > >>> >>When I run the geolocation mobile spec tests on Android I get two >>> >>failures. Both getCurrentPosition and watchPosition complain that >>> >>p.timestamp is an Object when it expects a number. Well the native >>> >>Android geolocation API returns a Date object not a timestamp in ms. >>> >>Looking into the W3C spec for Geolocation the timestamp property of >>> >>the Position interface should be a DOMTimeStamp [1]. In ECMAScript, >>> >>the DOMTimeStamp maps to the Date type. >>> >> >>> >>So it seems like we have a number of items that we should address: >>> >> >>> >>1) Update the geolocation tests to expect timestamp to be a Date. >>> >>2) Fix the documentation to let people know the timestamp property is >>> >>a Data and not an integer of type ms. >>> >>3) Change the native implementations to return Date's not integers. >>> >> >>> >>What do you think should I go create JIRA tickets for all these issue= s? >>> >> >>> >>[1] http://www.w3.org/TR/geolocation-API/#position_interface >>> >>[2] http://www.w3.org/TR/DOM-Level-3-Core/core.html#Core-DOMTimeStamp >>> >> >>> >> >>> >>Simon Mac Donald >>> >>http://hi.im/simonmacdonald >>> > >>> >> >>