[email protected] | 5a4d0fa | 2010-06-04 09:56:50 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | <html> |
| 3 | <head> |
tkent | c5e88f0 | 2017-02-06 22:47:31 | [diff] [blame] | 4 | <script src="../resources/js-test.js"></script> |
[email protected] | 5a4d0fa | 2010-06-04 09:56:50 | [diff] [blame] | 5 | </head> |
| 6 | <body> |
tkent | 98122ee | 2017-02-02 07:38:51 | [diff] [blame] | 7 | <script> |
| 8 | 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."); |
| 9 | |
| 10 | function onIframeReady() { |
| 11 | // Make request from remote frame, with call chain starting here |
| 12 | window.setTimeout(function() { |
| 13 | iframe.contentWindow.navigator.geolocation.getCurrentPosition(function() { |
| 14 | testPassed('Success callback invoked'); |
| 15 | finishJSTest(); |
| 16 | }, function() { |
| 17 | testFailed('Error callback invoked unexpectedly'); |
| 18 | finishJSTest(); |
Maxim Kolosovskiy | 2291dbc | 2017-12-08 10:48:54 | [diff] [blame] | 19 | }); |
tkent | 98122ee | 2017-02-02 07:38:51 | [diff] [blame] | 20 | }, 0); |
| 21 | } |
| 22 | |
| 23 | var iframe = document.createElement('iframe'); |
| 24 | iframe.src = 'resources/callback-to-remote-context-inner.html'; |
| 25 | document.body.appendChild(iframe); |
| 26 | |
| 27 | window.jsTestIsAsync = true; |
| 28 | </script> |
[email protected] | 5a4d0fa | 2010-06-04 09:56:50 | [diff] [blame] | 29 | </body> |
| 30 | </html> |