1description("Tests that when a Geolocation request is made from a remote frame, and the JavaScript call chain starts from that remote frame, callbacks are made as usual."); 2 3function onIframeReady() { 4 // Make request from remote frame, with call chain starting here 5 window.setTimeout(function() { 6 iframe.contentWindow.navigator.geolocation.getCurrentPosition(function() { 7 testPassed('Success callback invoked'); 8 finishJSTest(); 9 }, function() { 10 testFailed('Error callback invoked unexpectedly'); 11 finishJSTest(); 12 }); 13 }, 0); 14} 15 16var iframe = document.createElement('iframe'); 17iframe.src = 'resources/callback-to-remote-context-inner.html'; 18document.body.appendChild(iframe); 19 20window.jsTestIsAsync = true; 21window.successfullyParsed = true; 22