blob: 4f789f6779386a164dd25b1124c50db1c918745e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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;
|