| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../../resources/js-test-pre.js"></script> |
| description("Tests Geolocation error callback using the mock service."); |
| var mockMessage = "debug"; |
| testRunner.setGeolocationPermission(true); |
| testRunner.setMockGeolocationPositionUnavailableError(mockMessage); |
| debug('This test can not be run without the testRunner'); |
| navigator.geolocation.getCurrentPosition(function(p) { |
| testFailed('Success callback invoked unexpectedly'); |
| shouldBe('error.code', 'error.POSITION_UNAVAILABLE'); |
| shouldBe('error.message', 'mockMessage'); |
| shouldBe('error.UNKNOWN_ERROR', 'undefined'); |
| shouldBe('error.PERMISSION_DENIED', '1'); |
| shouldBe('error.POSITION_UNAVAILABLE', '2'); |
| shouldBe('error.TIMEOUT', '3'); |
| window.jsTestIsAsync = true; |
| <script src="../../../resources/js-test-post.js"></script> |