2011-01-17 John Knottenbelt <jknotten@chromium.org>
[WebKit-https.git] / LayoutTests / fast / dom / Geolocation / resources / window-close-popup.html
1 <script>
2 var mockLatitude = 51.478;
3 var mockLongitude = -0.166;
4 var mockAccuracy = 100.0;
5
6 function loadNext() {
7     var geolocation = navigator.geolocation;
8
9     if (window.layoutTestController) {
10        layoutTestController.setGeolocationPermission(true);
11        layoutTestController.setMockGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy);
12     }
13
14     navigator.geolocation.watchPosition(
15        function(p) { window.opener.gotPosition(); },
16        function(e) { window.opener.failedToCreateWatch(e); });
17 }
18 </script>
19 <body onload="loadNext()"></body>