| <script src="../resources/js-test-pre.js"></script> |
| description("Tests that navigator.geolocation cannot be shadowed."); |
| function testInStrictMode() |
| navigator.geolocation = 1; |
| testFailed("navigator.geolocation = 1 did not throw exception."); |
| testPassed("navigator.geolocation = 1 threw exception " + e + "."); |
| shouldNotBe("navigator.geolocation", "1"); |
| function testInNonStrictMode() |
| shouldNotThrow("navigator.geolocation = 1"); |
| shouldNotBe("navigator.geolocation", "1"); |
| debug ("* Non-Strict mode"); |
| <script src="../resources/js-test-post.js"></script> |