Geoclue and WebKit: unit tests
ensonic at hora-obscura.de
Wed Jun 16 00:49:58 PDT 2010
On 15.06.2010 11:16, Javier Fernandez Garcia-Boente wrote:
> Hi everybody,
> I've been working on the Geolocation unit tests of the WebKitGtk port.
> Currently, only 3 tests are enabled in the Gtk port, which on the other
> hand, is the only port that implements the Geolocation API nowadays. I
> think that completing the unit tests set would be a great stuff and it
> could improve a lot the visibility of the GeoClue project.
> I've been working on the following test:
> Perhaps my environment is not fully configured or incomplete, but the
> test fail because its waiting for some web service response, in case
> some of the related providers was selected, or its waiting for Inet
> connection. I had problems with the NetworkManager; i had to hack the
> NetworkManager code to always return TRUE when connectivity request is
> sent. The lack of a correct Provider selection algorithm could also
> Im not sure how would be the better approach to face this problem so i
> would like to get some feedback from the GeoClue community. I've though
> that the Manual provider could be used for unit testing purposes, but it
> would require some human interaction, if I've correctly understood how
> the provider works.
I had simillar experience. Geoclue should definitely have a better
README to help people to get started.
geoclue-properties was a quite handy tool for me to set things up and
Also most of the providers have a comment at the top of their source
that tells how to configure them.
> Another idea that came up into my mind was to create a Dummy provider,
> which gets the dummy position/address previously set by the unit tests
There are example and Manual providers already. You could probably use
the manual provider.
> location for all the WebKit ports through the SetPosition API, which has
> to be implemented by GeoClue. We could implement such method in the
> Dummy provider to locally store the dummy position to be retrieved when
> GetPosition is called.
The only providers I got to work somehow where "manual" and "localnet".
I have not gps attached to the system.
> Thanks in advance for your suggestions.
> GeoClue mailing list
> GeoClue at lists.freedesktop.org
More information about the GeoClue