• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3  <head>
4    <script>
5      function makeGeolocationRequest() {
6          if (window.layoutTestController) {
7              layoutTestController.setGeolocationPermission(true);
8              layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100);
9          }
10
11          // Make request from remote frame, this frame will be gone by the time the Geolocation
12          // object attempts to invoke the callback.
13          window.parent.navigator.geolocation.getCurrentPosition(function() {
14              alert('Success callback invoked unexpectedly');
15              if (window.layoutTestController)
16                  layoutTestController.notifyDone();
17          }, function() {
18              alert('Error callback invoked unexpectedly');
19              if (window.layoutTestController)
20                  layoutTestController.notifyDone();
21          });
22      }
23    </script>
24  </head>
25  <body onload="window.parent.onFirstIframeLoaded()", onunload="makeGeolocationRequest()">
26    <p>This frame should be replaced before the test ends</p>
27  </body>
28</html>
29