| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script> |
| function makeGeolocationRequest() { |
| if (window.testRunner) { |
| testRunner.setGeolocationPermission(true); |
| testRunner.setMockGeolocationPosition(51.478, -0.166, 100); |
| } |
| |
| var parent = window.parent; |
| |
| // Make request from remote frame, this frame will be gone by the time the Geolocation |
| // object attempts to invoke the callback. |
| window.parent.navigator.geolocation.getCurrentPosition(function() { |
| parent.testPassed('Success callback invoked'); |
| parent.finishJSTest(); |
| }, function() { |
| parent.testFailed('Error callback invoked unexpectedly'); |
| parent.finishJSTest(); |
| }); |
| } |
| </script> |
| </head> |
| <body onload="window.parent.onFirstIframeLoaded()", onunload="makeGeolocationRequest()"> |
| <p>This frame should be replaced before the test ends</p> |
| </body> |
| </html> |