| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
| <html> | |
| <head> | |
| <script src="../resources/js-test.js"></script> | |
| <script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script> | |
| <script src="file:///gen/device/geolocation/public/interfaces/geolocation.mojom.js"></script> | |
| <script src="file:///gen/third_party/blink/public/platform/modules/geolocation/geolocation_service.mojom.js"></script> | |
| <script src="file:///gen/third_party/blink/public/platform/modules/permissions/permission.mojom.js"></script> | |
| <script src="resources/geolocation-mock.js"></script> | |
| </head> | |
| <body> | |
| <script> | |
| description("This tests removing the watcher from an error callback does not causes assertions."); | |
| let mock = geolocationMock; | |
| mock.setGeolocationPermission(true); | |
| mock.setGeolocationPositionUnavailableError("debug"); | |
| var watchId = navigator.geolocation.watchPosition(function() { | |
| navigator.geolocation.clearWatch(watchId); | |
| finishJSTest(); | |
| }, function(e) { | |
| navigator.geolocation.clearWatch(watchId); | |
| finishJSTest(); | |
| }); | |
| window.jsTestIsAsync = true; | |
| </script> | |
| </body> | |
| </html> |