| OLD | NEW |
| (Empty) |
| 1 description("Tests Geolocation when permission is denied, using the mock service
."); | |
| 2 | |
| 3 var error; | |
| 4 | |
| 5 geolocationServiceMock.then(mock => { | |
| 6 | |
| 7 mock.setGeolocationPermission(false); | |
| 8 mock.setGeolocationPosition(51.478, -0.166, 100.0); | |
| 9 | |
| 10 navigator.geolocation.getCurrentPosition(function(p) { | |
| 11 testFailed('Success callback invoked unexpectedly'); | |
| 12 finishJSTest(); | |
| 13 }, function(e) { | |
| 14 error = e; | |
| 15 shouldBe('error.code', 'error.PERMISSION_DENIED'); | |
| 16 shouldBe('error.message', '"User denied Geolocation"'); | |
| 17 finishJSTest(); | |
| 18 }); | |
| 19 }); | |
| 20 | |
| 21 window.jsTestIsAsync = true; | |
| OLD | NEW |