blob: a682ff0161794761ae8dab5163d8b8c4e8e68d4f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
<script src="file:///gen/device/geolocation/public/interfaces/geolocation.mojom.js"></script>
<script src="file:///gen/third_party/WebKit/public/platform/modules/geolocation/geolocation_service.mojom.js"></script>
<script src="file:///gen/third_party/WebKit/public/platform/modules/permissions/permission.mojom.js"></script>
<script src="resources/geolocation-mock.js"></script>
</head>
<body>
<script>
description("Tests that no timers will trigger for navigator.geolocation object after onunload.");
if (!window.testRunner)
debug('This test can not run without testRunner');
geolocationMock.setGeolocationPermission(true);
location = "../fast/events/resources/onunload-single-alert-success.html";
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>
</body>
</html>