HTML5 browser can retrive the gps position of a computer. http://diveintohtml5.ep.io/geolocation.html
I would like to create an application that fakes a GPS device,
Chrome and Firefox:
GPS coordinates are available only on mobile browsers. What you are discussing is geolocation generally. Your dekstop or laptop computer does not have GPS device. Locations are expressed in latitude and longitude.
For iOS use iOS emulator. You can set fake GPS coordinates. You can download it from developer.apple.com.
For Android use Android emulator. You can set fake GPS coordinates. Google Android SDK.
For other browsers / mobile vendors download the corresponding emuator.
Desktop browsers do not use GPS data. They use either IP based or WLAN based locationing. For desktop browsers just write your own test stub for navigator.geolocation.