| Index: LayoutTests/fast/dom/Geolocation/resources/notimer-after-unload.js
|
| ===================================================================
|
| --- LayoutTests/fast/dom/Geolocation/resources/notimer-after-unload.js (revision 0)
|
| +++ LayoutTests/fast/dom/Geolocation/resources/notimer-after-unload.js (revision 48113)
|
| @@ -0,0 +1,21 @@
|
| +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");
|
| +}
|
| +
|
| +var isAsynchronous = true;
|
| +var successfullyParsed = true;
|
| +
|
| +if (window.layoutTestController) layoutTestController.waitUntilDone();
|
|
|