| OLD | NEW |
| (Empty) |
| 1 description("Tests that no timers will trigger for navigator.geolocation object
after onunload."); | |
| 2 | |
| 3 if (!window.testRunner) | |
| 4 debug('This test can not run without testRunner'); | |
| 5 | |
| 6 geolocationServiceMock.then(mock => { | |
| 7 mock.setGeolocationPermission(true); | |
| 8 | |
| 9 location = "data:text/html,You should have seen one unload alert appear.<scr
ipt>window.setTimeout('if (window.testRunner) testRunner.notifyDone();', 100);</
script>"; | |
| 10 }); | |
| 11 | |
| 12 document.body.onunload = function() { | |
| 13 navigator.geolocation.getCurrentPosition( | |
| 14 function(p) {alert('FAIL: Unexpected Geolocation success callback.');}, | |
| 15 function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.co
de + e.message);}, | |
| 16 {timeout: 0, maximumAge:0} | |
| 17 ); | |
| 18 alert("unload-called"); | |
| 19 } | |
| 20 | |
| 21 window.jsTestIsAsync = true; | |
| OLD | NEW |