summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html
blob: a5ca5e0f40e72ce0de8ac608eef5182d97eac4b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
  <head>
    <script>
      function makeGeolocationRequest() {
          if (window.layoutTestController) {
              layoutTestController.setGeolocationPermission(true);
              layoutTestController.setMockGeolocationPosition(51.478, -0.166, 100);
          }

          // 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() {
              alert('Success callback invoked unexpectedly');
              if (window.layoutTestController)
                  layoutTestController.notifyDone();
          }, function() {
              alert('Error callback invoked unexpectedly');
              if (window.layoutTestController)
                  layoutTestController.notifyDone();
          });
      }
    </script>
  </head>
  <body onload="window.parent.onFirstIframeLoaded()", onunload="makeGeolocationRequest()">
    <p>This frame should be replaced before the test ends</p>
  </body>
</html>