blob: ce58240029f75fbb85b55637b0dff90133e479f6 [file] [log] [blame]
[email protected]4f37ced2010-05-20 20:10:121<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
tkentc5e88f02017-02-06 22:47:314<script src="../resources/js-test.js"></script>
Reilly Grantbe310ab2017-07-11 01:51:265<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
6<script src="file:///gen/device/geolocation/public/interfaces/geolocation.mojom.js"></script>
7<script src="file:///gen/third_party/WebKit/public/platform/modules/permissions/permission.mojom.js"></script>
sammce6687802016-05-13 04:06:578<script src="resources/geolocation-mock.js"></script>
[email protected]4f37ced2010-05-20 20:10:129</head>
10<body>
tkent98122ee2017-02-02 07:38:5111<script>
12description("Tests that no timers will trigger for navigator.geolocation object after onunload.");
13
14if (!window.testRunner)
15 debug('This test can not run without testRunner');
16
Reilly Grantbe310ab2017-07-11 01:51:2617geolocationMock.setGeolocationPermission(true);
tkent98122ee2017-02-02 07:38:5118
Reilly Grantbe310ab2017-07-11 01:51:2619location = "../fast/events/resources/onunload-single-alert-success.html";
tkent98122ee2017-02-02 07:38:5120
21document.body.onunload = function() {
22 navigator.geolocation.getCurrentPosition(
23 function(p) {alert('FAIL: Unexpected Geolocation success callback.');},
24 function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.code + e.message);},
25 {timeout: 0, maximumAge:0}
26 );
27 alert("unload-called");
28}
29
30window.jsTestIsAsync = true;
31</script>
[email protected]4f37ced2010-05-20 20:10:1232</body>
33</html>