1description("Tests that no timers will trigger for navigator.geolocation object after onunload."); 2 3if (window.layoutTestController) layoutTestController.setGeolocationPermission(true); 4 5document.body.onload = function() { 6 location = "data:text/html,You should have seen one unload alert appear.<script>window.setTimeout('if (window.layoutTestController) layoutTestController.notifyDone();', 100);</script>"; 7} 8 9document.body.onunload = function() { 10 navigator.geolocation.getCurrentPosition( 11 function(p) {alert('FAIL: Unexpected Geolocation success callback.');}, 12 function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.code + e.message);}, 13 {timeout: 0, maximumAge:0} 14 ); 15 alert("unload-called"); 16} 17 18window.jsTestIsAsync = true; 19window.successfullyParsed = true; 20