| OLD | NEW |
| (Empty) |
| 1 description("Tests for a crash when clearWatch() is called with a zero ID.<br><b
r>We call clearWatch() with a request in progress then navigate the page. This a
ccesses the watchers map during cleanup and triggers the crash. This page should
not be visible when the test completes."); | |
| 2 | |
| 3 if (!window.testRunner) | |
| 4 debug('This test can not run without testRunner'); | |
| 5 | |
| 6 document.body.onload = function() { | |
| 7 geolocationServiceMock.then(mock => { | |
| 8 mock.setGeolocationPermission(true); | |
| 9 mock.setGeolocationPosition(51.478, -0.166, 100); | |
| 10 | |
| 11 navigator.geolocation.watchPosition(function() {}); | |
| 12 navigator.geolocation.clearWatch(0); | |
| 13 location = "data:text/html,TEST COMPLETE<script>if(window.testRunner) te
stRunner.notifyDone();</script>"; | |
| 14 }); | |
| 15 } | |
| 16 | |
| 17 window.jsTestIsAsync = true; | |
| OLD | NEW |