1 description("Tests that when a request is made on a Geolocation object after its frame has been disconnected, no callbacks are made and no crash occurs.");
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);
8 internals.setGeolocationPosition(document, 51.478, -0.166, 100);
10 function onFirstIframeLoaded() {
11 iframeGeolocation = iframe.contentWindow.navigator.geolocation;
12 iframe.src = 'resources/disconnected-frame-already-inner2.html';
16 function onSecondIframeLoaded() {
17 iframeGeolocation.getCurrentPosition(function () {
18 testFailed('Success callback invoked unexpectedly');
21 testFailed('Error callback invoked unexpectedly');
24 setTimeout(finishTest, 1000);
27 function finishTest() {
28 debug('Method called on Geolocation object with disconnected Frame.');
32 var iframe = document.createElement('iframe');
33 iframe.src = 'resources/disconnected-frame-already-inner1.html';
34 document.body.appendChild(iframe);
36 window.jsTestIsAsync = true;