blob: bb6547af57246b85b8fd8389315a8247773c1ea9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests that no timers will trigger for navigator.geolocation object after onunload.");
if (window.testRunner) testRunner.setGeolocationPermission(true);
document.body.onload = function() {
location = "data:text/html,You should have seen one unload alert appear.<script>window.setTimeout('if (window.testRunner) testRunner.notifyDone();', 100);</scr" + "ipt>";
}
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;
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>