blob: 6a5ee08e78fef0d4c735d0a12684851c286b98bb [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>
Julie Jeongeun Kim162c2d282019-03-13 07:23:527<script src="file:///gen/third_party/blink/public/mojom/geolocation/geolocation_service.mojom.js"></script>
8<script src="file:///gen/third_party/blink/public/mojom/permissions/permission.mojom.js"></script>
sammce6687802016-05-13 04:06:579<script src="resources/geolocation-mock.js"></script>
[email protected]4f37ced2010-05-20 20:10:1210</head>
11<body>
tkent98122ee2017-02-02 07:38:5112<script>
13description("Tests that no timers will trigger for navigator.geolocation object after onunload.");
14
15if (!window.testRunner)
16 debug('This test can not run without testRunner');
17
Reilly Grantbe310ab2017-07-11 01:51:2618geolocationMock.setGeolocationPermission(true);
tkent98122ee2017-02-02 07:38:5119
Reilly Grantbe310ab2017-07-11 01:51:2620location = "../fast/events/resources/onunload-single-alert-success.html";
tkent98122ee2017-02-02 07:38:5121
22document.body.onunload = function() {
23 navigator.geolocation.getCurrentPosition(
24 function(p) {alert('FAIL: Unexpected Geolocation success callback.');},
25 function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.code + e.message);},
26 {timeout: 0, maximumAge:0}
27 );
28 alert("unload-called");
29}
30
31window.jsTestIsAsync = true;
32</script>
[email protected]4f37ced2010-05-20 20:10:1233</body>
34</html>