Apple - How to simulate location on Safari on OS X
It seems that this still not possible in Safari.
For Firefox, there is a browser extension called Geolocater which does exactly what you want, but the latest reviews seem to indicate it is not compatible with the current version of Firefox.
Chrome has this functionality built-in in the Developer Console. Press ⌥ + ⌘ + I, go to the Console tab and inside the Console tab to the Sensors tab. There you can enable location simulation and specify the coordinates.