blob: 8109bd0895c0be1d6a179ed10d79d0c0567ca6bb [file] [log] [blame]
description("Tests that no timers will trigger for navigator.geolocation object after onunload.");
if (window.layoutTestController) layoutTestController.setGeolocationPermission(true);
document.body.onload = function() {
location = "data:text/html,You should have seen one unload alert appear.<script>window.setTimeout('if (window.layoutTestController) layoutTestController.notifyDone();', 100);</script>";
}
document.body.onunload = function() {
navigator.geolocation.getCurrentPosition(
function(p) {alert('FAIL: Unexpected Geolocation success callback.');},
function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.code + e.message);},
{timeout: 0, maximumAge:0}
);
alert("unload-called");
}
window.jsTestIsAsync = true;
window.successfullyParsed = true;