For bug https://bugs.webkit.org/show_bug.cgi?id=21475 a GeolocationServiceFake was attempted when the platform doesn't have a GeolocationService of its own. This would also have to not 'leak' into WebCore as a property on navigator when not in testing mode. The ways in the patches in that bug would leak this property out. I have attached the files here for the tests and the implementation of GeolocationServiceFake. For Geolocation and Navigator, custom toJS and IDL and hasOwnProperty methods are probably in the mix for what is necessary.
Created attachment 24464 [details] This is a GeolocationServiceFake implementation and test cases
-r45634 with an oddly super-long svn commit log.
Crap. Not supposed close that one.
Looks like this is going to be worked on in Bug 28264. *** This bug has been marked as a duplicate of bug 28264 ***