blob: 115b4ed396723467f667cf073b35e2dcc9e47f02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
description("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.");
function onIframeReady() {
// Make request from remote frame, with call chain starting here
window.setTimeout(function() {
iframe.contentWindow.navigator.geolocation.getCurrentPosition(function() {
testPassed('Success callback invoked');
finishJSTest();
}, function() {
testFailed('Error callback invoked unexpectedly');
finishJSTest();
});
}, 0);
}
var iframe = document.createElement('iframe');
iframe.src = 'resources/callback-to-remote-context-inner.html';
document.body.appendChild(iframe);
window.jsTestIsAsync = true;
window.successfullyParsed = true;
|