Disable geolocation browser using javascript
<p>I'm writing an integration test using QUnit, and in my webapp if geolocation is not available, (I use <code>if (navigator.geolocation)</code> to detect if is present or not, but I want to disable it in order to implement the test when geolocation is not available.</p>

<p>I tried <code>navigator.geolocation = undefined</code> but unfortunately it didn't work.</p>