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 85BD2C8F1 for ; Tue, 5 Jun 2012 17:00:48 +0000 (UTC) Received: (qmail 90239 invoked by uid 500); 5 Jun 2012 17:00:48 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 90220 invoked by uid 500); 5 Jun 2012 17:00:48 -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 90212 invoked by uid 99); 5 Jun 2012 17:00:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 17:00:48 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gibson.becky@gmail.com designates 209.85.213.175 as permitted sender) Received: from [209.85.213.175] (HELO mail-yx0-f175.google.com) (209.85.213.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 17:00:43 +0000 Received: by yenl13 with SMTP id l13so4149232yen.6 for ; Tue, 05 Jun 2012 10:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=7y/TBXg3FAKikPa9TfDiwOCL5ntxBaTV25j768Fu/QE=; b=Y+lDIFFTZdPxIX2tpfEiMqzVe6/y4b+e2wy405695KjvyKgPQf2SRo4JhL3A9Hs//S jmVQ/CJJl5kaZ3Mxqj/btZ0Kv6qG2/LssUGKZqopEj6aVSfKe2Ks2J3idZ2DosaZ9THL T4GsOfCM/QZdx1cjcKhY9uW/2JqYZgPZzjOaShBb/hzdDMcsqxlHDApqNYkl0/HbXC07 rPUkpTlu1LPwlRny/mU9BEI3qtFvh/hY/LR4cdIK14TKJ2+wv71fZj6CgyankoE3ONPo Wjq109+5JNvLHGFth3npiPeD/ICWCuKXfAjL2jBBPw33+ml3Z9Ovc+rha+vORqMjR1Fz RqZw== MIME-Version: 1.0 Received: by 10.236.76.233 with SMTP id b69mr12492152yhe.52.1338915622776; Tue, 05 Jun 2012 10:00:22 -0700 (PDT) Received: by 10.146.2.11 with HTTP; Tue, 5 Jun 2012 10:00:22 -0700 (PDT) In-Reply-To: References: Date: Tue, 5 Jun 2012 13:00:22 -0400 Message-ID: Subject: Re: Geolocation test failures in Mobile Spec From: Becky Gibson To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=20cf300fb37114701504c1bc9662 X-Virus-Checked: Checked by ClamAV on apache.org --20cf300fb37114701504c1bc9662 Content-Type: text/plain; charset=ISO-8859-1 This is the reason for the iOS failure in watchLocation. There is code in getCurrentLocation that assumes the timestamp is a Date object and does a geolocation.lastPosition.timestamp.getTime(). Since iOS is returning the timestamp in milliseconds the .getTime() call fails. I think we can handle this in JavaScript code as long as new Date(DateObjORMilliseconds) works ( pass a Date object or milliseconds to the Date constructor). -becky On Tue, Jun 5, 2012 at 12:44 PM, Simon MacDonald 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 (!!!!!) that > > domtimestamp === number. > > > > *sad trumpet noise* > > > > On 6/5/12 9:31 AM, "Simon MacDonald" wrote: > > > >>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 issues? > >> > >>[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 > > > --20cf300fb37114701504c1bc9662--