W3C home > Mailing lists > Public > public-geolocation@w3.org > October 2009

Using wttjs to generate test cases

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Wed, 28 Oct 2009 19:18:02 +0100
To: public-geolocation@w3.org
Message-Id: <1256753882.4531.3296.camel@localhost>
Hi,

I have been looking at wttjs [1] to generate test cases for specs based
on WebIDL definitions.

As a test run, I have generated test cases for the NavigatorGeolocation
and Geolocation interfaces as defined in the Geolocation spec [2].

I’ve posted the resulting test files at:
http://www.w3.org/2009/10/webidl-tests/tests/geo/
that can be run from the harness at
http://www.w3.org/2009/10/webidl-tests/tests/geo/all.html
(based on the following JSON “instantiation” file:
http://www.w3.org/2009/10/webidl-tests/geolocation.json )

But in Firefox 3.5 where the geolocation interface is supposedly
implemented, only 3 tests pass since "Geolocation" is not recognized as
an interface in the global namespace (if I understand the test
correctly):
http://www.w3.org/2009/10/webidl-tests/tests/geo/geolocation-interface-object-has-property.html
>From what I can see, the reason is that in Mozilla, the interfaces
defined in the Geolocation API are all prefixed with “Geo”:
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/geolocation/
I got many more passed tests when I updated the WebIDL to use
“GeoGeolocation” and others.

It seems the same test (of existence of the global Geolocation
interface) is failing on the iPhone, although I haven’t been able to
look into the details there.

I’m wondering if this discrepancy between the spec and these particular
implementations is just a bug in the implementations, or the sign of a
more serious problem in the spec, or a bug in my understanding of the
spec, or a bug in the tests generated by wttjs.

Besides this question, if these rather low-level tests can useful to
your group, feel free to integrate them in your test suite; if they are
not, I would be interested to know why — in particular, to know whether
I should bother looking into developing similar tests for other
WebIDL-based technologies or not.

Dom

1. http://suika.fam.cx/www/webidl2tests/readme#instantiate
2. http://dev.w3.org/geo/api/spec-source.html
Received on Wednesday, 28 October 2009 18:18:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 March 2012 18:13:45 GMT