This should have been easier to solve then it was, so I thought I’d post it here for anyone else looking for a way to reset a geolocation prompt in Google Chrome.
Open the Chrome > Preferences > Settings > Privacy > Content settings… > Location panel in Chrome, or copy and paste this URL into your browser:
chrome://settings/contentExceptions#location
Then you just remove the hostname patterns that you want to reset:
That’s it! Hopefully this helps someone else out there reset a geolocation prompt in Google Chrome. This is very useful for testing navigator.geolocation.getCurrentPosition()
usage in Chrome.
Unfortunately it’s not possible to automate though so it can be difficult to work with this and a test runner. If anyone else has a solution that works well with automated testing please post a comment, I’d love to hear about it!