How to simulate location on Safari on OS X
It seems that this still not possible in Safari.
For Firefox, there are several browser extensions, e.g. Location Guard which does exactly what you want. Or you can change it via the configuration, as described in this Security Stack Exchange answer.
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.