Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Geolocation / script-tests / notimer-after-unload.js
blobc336bad337d77eb35fa6e99aa188d5c1ded176bf
1 description("Tests that no timers will trigger for navigator.geolocation object after onunload.");
3 if (!window.testRunner || !window.internals)
4 debug('This test can not run without testRunner or internals');
6 internals.setGeolocationClientMock(document);
7 internals.setGeolocationPermission(document, true);
9 document.body.onload = function() {
10 location = "data:text/html,You should have seen one unload alert appear.<script>window.setTimeout('if (window.testRunner) testRunner.notifyDone();', 100);</script>";
13 document.body.onunload = function() {
14 navigator.geolocation.getCurrentPosition(
15 function(p) {alert('FAIL: Unexpected Geolocation success callback.');},
16 function(e) {alert('FAIL: Unexpected Geolocation error callback.' + e.code + e.message);},
17 {timeout: 0, maximumAge:0}
19 alert("unload-called");
22 window.jsTestIsAsync = true;