blob: 6c1d1b58fde12a1b741bebe9a9b7332d972bd273 [file] [log] [blame]
[email protected]5a4d0fa2010-06-04 09:56:501<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
tkentc5e88f02017-02-06 22:47:314<script src="../resources/js-test.js"></script>
5<script src="../resources/mojo-helpers.js"></script>
sammce6687802016-05-13 04:06:576<script src="resources/geolocation-mock.js"></script>
[email protected]5a4d0fa2010-06-04 09:56:507</head>
8<body>
tkent98122ee2017-02-02 07:38:519<script>
10description("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.");
11
12function onIframeReady() {
13 // Make request from remote frame, with call chain starting here
14 window.setTimeout(function() {
15 iframe.contentWindow.navigator.geolocation.getCurrentPosition(function() {
16 testPassed('Success callback invoked');
17 finishJSTest();
18 }, function() {
19 testFailed('Error callback invoked unexpectedly');
20 finishJSTest();
21 });
22 }, 0);
23}
24
25var iframe = document.createElement('iframe');
26iframe.src = 'resources/callback-to-remote-context-inner.html';
27document.body.appendChild(iframe);
28
29window.jsTestIsAsync = true;
30</script>
[email protected]5a4d0fa2010-06-04 09:56:5031</body>
32</html>