Geoclue and WebKit: unit tests

Javier Fernandez Garcia-Boente jfernandez at igalia.com
Mon Jun 21 04:32:18 PDT 2010


On Thu, 2010-06-17 at 11:25 +0200, Javier Fernandez Garcia-Boente wrote:

> Yeah, I already thought about using Localnet; not sure whether Manual
> would fit better with the unit testing purposes. Anyway, ill try to
> continue your work and using Localnet for the time being.  

Despite the Localnet provider could fit too for unit testing purposes, i
think the Manual one fits better from the conceptional point of view.
The Localnet requires network resources, even though it reads the
location data from a configuration file; this file should be associated
to an access point. 

So, bearing this in mind, i think the Manual provider should be the one
to use for unit testing. I attached a patch for implementing the
Position interface on such provider. 

Another issue to think about is how to choose the provider; I've already
suggested in a former email a provider selection algorithm. I think it
would deserve a bug in the bugzilla :) If everybody agrees, i could fill
a new bug and work on it, developing my preliminary patch in a better
way, perhaps considering more advanced heuristic to choose he best
location provider.

Anyway, getting back to the WebKit Geolocation unit tests topic, i think
we should provide a way of forcing one provider as the selected one,
even though if several are available. When programming unit tests, not
every functionality have to be enabled; even more, some of them could be
dangerous or inefficient for the automatic testing framework. The usual
way of programming unit tests by setting a dummy GPS coordinates before
executing the test and retrieving such dummy coordinates as the result
of the operation, so the Manual provider seems to be the more
appropriated for this way of use the Geolocation API.

Do you think this is the right way to proceed ? Implementing a way of
selecting a fixed provider.

Greetings, 
 

-- 
Javi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 6532 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/geoclue/attachments/20100621/70a85477/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/geoclue/attachments/20100621/70a85477/attachment.pgp>


More information about the GeoClue mailing list