| OLD | NEW |
| 1 <script src="../../../../resources/mojo-helpers.js"></script> | 1 <script src="../../resources/mojo-helpers.js"></script> |
| 2 <script src="geolocation-mock.js"></script> | 2 <script src="geolocation-mock.js"></script> |
| 3 <script> | 3 <script> |
| 4 var mockLatitude = 51.478; | 4 var mockLatitude = 51.478; |
| 5 var mockLongitude = -0.166; | 5 var mockLongitude = -0.166; |
| 6 var mockAccuracy = 100.0; | 6 var mockAccuracy = 100.0; |
| 7 | 7 |
| 8 function loadNext() { | 8 function loadNext() { |
| 9 geolocationServiceMock.then(mock => { | 9 geolocationServiceMock.then(mock => { |
| 10 mock.setGeolocationPermission(true); | 10 mock.setGeolocationPermission(true); |
| 11 mock.setGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy); | 11 mock.setGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy); |
| 12 | 12 |
| 13 navigator.geolocation.watchPosition(window.opener.gotPosition); | 13 navigator.geolocation.watchPosition(window.opener.gotPosition); |
| 14 }); | 14 }); |
| 15 } | 15 } |
| 16 </script> | 16 </script> |
| 17 <body onload="loadNext()"></body> | 17 <body onload="loadNext()"></body> |
| OLD | NEW |