[email protected] | 4f37ced | 2010-05-20 20:10:12 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | <html> |
| 3 | <head> |
tkent | c5e88f0 | 2017-02-06 22:47:31 | [diff] [blame] | 4 | <script src="../resources/js-test.js"></script> |
Reilly Grant | be310ab | 2017-07-11 01:51:26 | [diff] [blame] | 5 | <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 Kim | 162c2d28 | 2019-03-13 07:23:52 | [diff] [blame] | 7 | <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> |
sammc | e668780 | 2016-05-13 04:06:57 | [diff] [blame] | 9 | <script src="resources/geolocation-mock.js"></script> |
[email protected] | 4f37ced | 2010-05-20 20:10:12 | [diff] [blame] | 10 | </head> |
| 11 | <body> |
tkent | 98122ee | 2017-02-02 07:38:51 | [diff] [blame] | 12 | <script> |
| 13 | description("Tests that no timers will trigger for navigator.geolocation object after onunload."); |
| 14 | |
| 15 | if (!window.testRunner) |
| 16 | debug('This test can not run without testRunner'); |
| 17 | |
Reilly Grant | be310ab | 2017-07-11 01:51:26 | [diff] [blame] | 18 | geolocationMock.setGeolocationPermission(true); |
tkent | 98122ee | 2017-02-02 07:38:51 | [diff] [blame] | 19 | |
Reilly Grant | be310ab | 2017-07-11 01:51:26 | [diff] [blame] | 20 | location = "../fast/events/resources/onunload-single-alert-success.html"; |
tkent | 98122ee | 2017-02-02 07:38:51 | [diff] [blame] | 21 | |
| 22 | document.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 | |
| 31 | window.jsTestIsAsync = true; |
| 32 | </script> |
[email protected] | 4f37ced | 2010-05-20 20:10:12 | [diff] [blame] | 33 | </body> |
| 34 | </html> |